Class: RubyHue::Light
- Inherits:
-
Object
- Object
- RubyHue::Light
- Defined in:
- lib/ruby_hue/light.rb,
lib/ruby_hue/light/state.rb,
lib/ruby_hue/light/basic_state.rb
Defined Under Namespace
Modules: BasicState Classes: State
Instance Attribute Summary collapse
-
#bridge ⇒ Object
readonly
Returns the value of attribute bridge.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(id, bridge) ⇒ Light
constructor
A new instance of Light.
- #state ⇒ Object
Constructor Details
#initialize(id, bridge) ⇒ Light
Returns a new instance of Light.
5 6 7 8 |
# File 'lib/ruby_hue/light.rb', line 5 def initialize(id, bridge) @id = id @bridge = bridge end |
Instance Attribute Details
#bridge ⇒ Object (readonly)
Returns the value of attribute bridge.
3 4 5 |
# File 'lib/ruby_hue/light.rb', line 3 def bridge @bridge end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/ruby_hue/light.rb', line 3 def id @id end |
Instance Method Details
#attributes ⇒ Object
10 11 12 |
# File 'lib/ruby_hue/light.rb', line 10 def attributes @attributes ||= Client.get_and_parse bridge.resource_url_for("lights/#{id}") end |