Class: Omc::Layer
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#stack ⇒ Object
readonly
Returns the value of attribute stack.
Instance Method Summary collapse
-
#initialize(stack, attributes) ⇒ Layer
constructor
A new instance of Layer.
- #instances ⇒ Object
Constructor Details
#initialize(stack, attributes) ⇒ Layer
Returns a new instance of Layer.
11 12 13 14 |
# File 'lib/omc/layer.rb', line 11 def initialize stack, attributes @stack = stack @attributes = attributes end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/omc/layer.rb', line 5 def attributes @attributes end |
#stack ⇒ Object (readonly)
Returns the value of attribute stack.
5 6 7 |
# File 'lib/omc/layer.rb', line 5 def stack @stack end |
Instance Method Details
#instances ⇒ Object
16 17 18 19 20 |
# File 'lib/omc/layer.rb', line 16 def instances @instances ||= @stack.instances.select do |i| i[:layer_ids].include? self[:layer_id] end end |