Class: Huebot::Group

Inherits:
Object
  • Object
show all
Includes:
DeviceState
Defined in:
lib/huebot/group.rb

Defined Under Namespace

Classes: Input

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DeviceState

#get_state, #set_state

Constructor Details

#initialize(client, id, attrs) ⇒ Group

Returns a new instance of Group.



13
14
15
16
17
# File 'lib/huebot/group.rb', line 13

def initialize(client, id, attrs)
  @client = client
  @id = id.to_i
  @name = attrs.fetch("name")
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



11
12
13
# File 'lib/huebot/group.rb', line 11

def client
  @client
end

#idObject (readonly)

Returns the value of attribute id.



11
12
13
# File 'lib/huebot/group.rb', line 11

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



11
12
13
# File 'lib/huebot/group.rb', line 11

def name
  @name
end