Class: MEACControl::Device

Inherits:
Object
  • Object
show all
Defined in:
lib/meac_control/device.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(device_id, options = {}) ⇒ Device

Returns a new instance of Device.



6
7
8
9
# File 'lib/meac_control/device.rb', line 6

def initialize(device_id, options = {})
  @id = device_id
  @name = options[:name] if options[:name]
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/meac_control/device.rb', line 3

def id
  @id
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/meac_control/device.rb', line 4

def name
  @name
end