Class: SceneList
- Inherits:
-
Object
- Object
- SceneList
- Defined in:
- lib/lights/scenelist.rb
Instance Attribute Summary collapse
-
#scenes ⇒ Object
readonly
Returns the value of attribute scenes.
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(data = {}) ⇒ SceneList
constructor
A new instance of SceneList.
- #to_json(options = {}) ⇒ Object
Constructor Details
Instance Attribute Details
#scenes ⇒ Object (readonly)
Returns the value of attribute scenes.
5 6 7 |
# File 'lib/lights/scenelist.rb', line 5 def scenes @scenes end |
Instance Method Details
#data ⇒ Object
12 13 14 15 16 |
# File 'lib/lights/scenelist.rb', line 12 def data data = @data @scenes.each {|b| data[b.id] = b.data} if @scenes data end |
#to_json(options = {}) ⇒ Object
18 19 20 |
# File 'lib/lights/scenelist.rb', line 18 def to_json(={}) data.to_json end |