Class: Scene
Instance Attribute Summary collapse
-
#active ⇒ Object
Returns the value of attribute active.
-
#id ⇒ Object
Returns the value of attribute id.
-
#lights ⇒ Object
Returns the value of attribute lights.
-
#name ⇒ Object
Returns the value of attribute name.
-
#recycle ⇒ Object
Returns the value of attribute recycle.
-
#transition_time ⇒ Object
Returns the value of attribute transition_time.
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(id = nil, data = {}) ⇒ Scene
constructor
A new instance of Scene.
Methods inherited from HObject
Constructor Details
#initialize(id = nil, data = {}) ⇒ Scene
Returns a new instance of Scene.
5 6 7 8 9 10 11 12 |
# File 'lib/lights/scene.rb', line 5 def initialize(id = nil,data = {}) @id = id @name = data["name"] @active = data["active"] @lights = data["lights"] @recycle = data["recycle"] @transition_time = data["transitiontime"] end |
Instance Attribute Details
#active ⇒ Object
Returns the value of attribute active.
4 5 6 |
# File 'lib/lights/scene.rb', line 4 def active @active end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/lights/scene.rb', line 4 def id @id end |
#lights ⇒ Object
Returns the value of attribute lights.
4 5 6 |
# File 'lib/lights/scene.rb', line 4 def lights @lights end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/lights/scene.rb', line 4 def name @name end |
#recycle ⇒ Object
Returns the value of attribute recycle.
4 5 6 |
# File 'lib/lights/scene.rb', line 4 def recycle @recycle end |
#transition_time ⇒ Object
Returns the value of attribute transition_time.
4 5 6 |
# File 'lib/lights/scene.rb', line 4 def transition_time @transition_time end |
Instance Method Details
#data ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/lights/scene.rb', line 14 def data data = {} data["name"] = @name if @name data["active"] = @active unless @active.nil? data["lights"] = @lights if @lights data["recycle"] = @recycle unless @recycle.nil? data["transitiontime"] = @transition_time if @transition_time data end |