Class: BTAP::EQuest::LayerManager
- Inherits:
-
Object
- Object
- BTAP::EQuest::LayerManager
- Includes:
- Singleton
- Defined in:
- lib/openstudio-standards/btap/equest.rb
Overview
This class will manage all the layer information of the Reference components.
Defined Under Namespace
Classes: Layer
Instance Attribute Summary collapse
-
#layers ⇒ Object
Array of all the layers.
Instance Method Summary collapse
-
#add_layer(new_layer) ⇒ Object
Add a layer.
-
#initialize ⇒ LayerManager
constructor
A new instance of LayerManager.
Constructor Details
#initialize ⇒ LayerManager
Returns a new instance of LayerManager.
2417 2418 2419 |
# File 'lib/openstudio-standards/btap/equest.rb', line 2417 def initialize @layers = Array.new() end |
Instance Attribute Details
#layers ⇒ Object
Array of all the layers
2416 2417 2418 |
# File 'lib/openstudio-standards/btap/equest.rb', line 2416 def layers @layers end |
Instance Method Details
#add_layer(new_layer) ⇒ Object
Add a layer. If the layer already exists. It will return the exi
2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 |
# File 'lib/openstudio-standards/btap/equest.rb', line 2422 def add_layer(new_layer) #first determine if the layer already exists. @layers.each do |current_layer| if new_layer == current_layer return current_layer end end @layers.push(new_layer) return @layers.last() end |