Class: Honeybee::InternalMassAbridged
- Inherits:
-
ModelObject
- Object
- ModelObject
- Honeybee::InternalMassAbridged
- Defined in:
- lib/honeybee/internalmass.rb,
lib/to_openstudio/internalmass.rb
Instance Attribute Summary
Attributes inherited from ModelObject
#errors, #openstudio_object, #warnings
Instance Method Summary collapse
Methods inherited from ModelObject
#allowable_types, clean_identifier, clean_name, #find_existing_openstudio_object, #initialize, #method_missing, read_from_disk, truncate
Constructor Details
This class inherits a constructor from Honeybee::ModelObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Honeybee::ModelObject
Instance Method Details
#defaults ⇒ Object
37 38 39 |
# File 'lib/honeybee/internalmass.rb', line 37 def defaults @@schema[:components][:schemas][:InternalMassAbridged][:properties] end |
#to_openstudio(openstudio_model, parent) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/to_openstudio/internalmass.rb', line 37 def to_openstudio(openstudio_model, parent) # create the internal mass definition and set properties os_mass_def = OpenStudio::Model::InternalMassDefinition.new(openstudio_model) os_mass_def.setName(@hash[:identifier] + '::' + parent.name.get) os_mass_def.setSurfaceArea(@hash[:area]) construction = openstudio_model.getConstructionByName(@hash[:construction]) unless construction.empty? os_construction = construction.get os_mass_def.setConstruction(os_construction) end # assign the internal mass definition to an internal mass object os_mass = OpenStudio::Model::InternalMass.new(os_mass_def) os_mass.setName(@hash[:identifier] + '::' + parent.name.get) os_mass end |