Class: Omc::Layer

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/omc/layer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#attributesObject (readonly)

Returns the value of attribute attributes.



5
6
7
# File 'lib/omc/layer.rb', line 5

def attributes
  @attributes
end

#stackObject (readonly)

Returns the value of attribute stack.



5
6
7
# File 'lib/omc/layer.rb', line 5

def stack
  @stack
end

Instance Method Details

#instancesObject



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