Class: Huebot::Light
- Inherits:
-
Object
- Object
- Huebot::Light
- Includes:
- DeviceState
- Defined in:
- lib/huebot/light.rb
Defined Under Namespace
Classes: Input
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(client, id, attrs) ⇒ Light
constructor
A new instance of Light.
Methods included from DeviceState
Constructor Details
#initialize(client, id, attrs) ⇒ Light
Returns a new instance of Light.
13 14 15 16 17 18 |
# File 'lib/huebot/light.rb', line 13 def initialize(client, id, attrs) @client = client @id = id.to_i @name = attrs.fetch("name") @attrs = attrs end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
11 12 13 |
# File 'lib/huebot/light.rb', line 11 def client @client end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
11 12 13 |
# File 'lib/huebot/light.rb', line 11 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
11 12 13 |
# File 'lib/huebot/light.rb', line 11 def name @name end |