Class: Gruff::Group

Inherits:
Object
  • Object
show all
Includes:
Observable
Defined in:
lib/gruff/scene.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(folder_name, layers) ⇒ Group

Returns a new instance of Group.



114
115
116
117
118
119
# File 'lib/gruff/scene.rb', line 114

def initialize(folder_name, layers)
  @name = folder_name
  layers.each do |layer|
    layer.observe self
  end
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



112
113
114
# File 'lib/gruff/scene.rb', line 112

def name
  @name
end

Instance Method Details

#send_updates(value) ⇒ Object



121
122
123
124
# File 'lib/gruff/scene.rb', line 121

def send_updates(value)
  changed
  notify_observers value
end