Skip to content

Commit

Permalink
Merge pull request #4991 from NREL/missing_deprecated_ruby
Browse files Browse the repository at this point in the history
Add deprecated ruby method IdfObject::to_<deprecated>
  • Loading branch information
jmarrec authored Oct 5, 2023
2 parents 308fa5a + ac95938 commit de66140
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/model/Model_Common_Include.i
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
%init %{
rb_eval_string("OpenStudio::Model::" #_oldName " = OpenStudio::Model::" #_newName "");

rb_eval_string("OpenStudio::IdfObject.class_eval { define_method(:to_" #_oldName ") { OpenStudio::logFree(OpenStudio::Warn, 'openstudio.model._oldName', 'Deprecated at _deprecatedAtVersionMajor._deprecatedAtVersionMinor._deprecatedAtVersionPatch, use _newName'); OpenStudio::Model::to" #_newName "(self); } }");
rb_eval_string("OpenStudio::Model::Model.class_eval { define_method(:get" #_oldName ") { |handle| OpenStudio::logFree(OpenStudio::Warn, 'openstudio.model._oldName', 'Deprecated at _deprecatedAtVersionMajor._deprecatedAtVersionMinor._deprecatedAtVersionPatch, use _newName');OpenStudio::Model::get" #_newName "(self, handle); } }");
rb_eval_string("OpenStudio::Model::Model.class_eval { define_method(:get" #_oldName "s) { OpenStudio::logFree(OpenStudio::Warn, 'openstudio.model._oldName', 'Deprecated at _deprecatedAtVersionMajor._deprecatedAtVersionMinor._deprecatedAtVersionPatch, use _newName'); OpenStudio::Model::get" #_newName "s(self); } }");
rb_eval_string("OpenStudio::Model::Model.class_eval { define_method(:get" #_oldName "ByName) { |name| OpenStudio::logFree(OpenStudio::Warn, 'openstudio.model._oldName', 'Deprecated at _deprecatedAtVersionMajor._deprecatedAtVersionMinor._deprecatedAtVersionPatch, use _newName'); OpenStudio::Model::get" #_newName "ByName(self, name); } }");
Expand Down

0 comments on commit de66140

Please sign in to comment.