Class: BTAP::EQuest::LayerManager

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeLayerManager

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

#layersObject

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