Class: Druzy::Protocol::Device

Inherits:
MVC::Model
  • Object
show all
Defined in:
lib/druzy/protocol/device.rb

Direct Known Subclasses

Renderer

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(identifier, protocol, name, icon) ⇒ Device

Returns a new instance of Device.



9
10
11
12
13
14
15
# File 'lib/druzy/protocol/device.rb', line 9

def initialize(identifier,protocol,name,icon)
  super()
  @identifier=identifier
  @protocol=protocol
  @name=name
  @icon=icon
end

Instance Attribute Details

#iconObject (readonly)

Returns the value of attribute icon.



7
8
9
# File 'lib/druzy/protocol/device.rb', line 7

def icon
  @icon
end

#identifierObject (readonly)

Returns the value of attribute identifier.



7
8
9
# File 'lib/druzy/protocol/device.rb', line 7

def identifier
  @identifier
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/druzy/protocol/device.rb', line 7

def name
  @name
end

#protocolObject (readonly)

Returns the value of attribute protocol.



7
8
9
# File 'lib/druzy/protocol/device.rb', line 7

def protocol
  @protocol
end

Instance Method Details

#==(o) ⇒ Object

il faut faire le cas ou o est nil



18
19
20
21
22
23
24
# File 'lib/druzy/protocol/device.rb', line 18

def ==(o)
  if !o.is_a? Device
    return false
  else
    return @identifier==o.identifier
  end
end