Class: Druzy::Protocol::Device
- Inherits:
-
MVC::Model
- Object
- MVC::Model
- Druzy::Protocol::Device
- Defined in:
- lib/druzy/protocol/device.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#icon ⇒ Object
readonly
Returns the value of attribute icon.
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#protocol ⇒ Object
readonly
Returns the value of attribute protocol.
Instance Method Summary collapse
-
#==(o) ⇒ Object
il faut faire le cas ou o est nil.
-
#initialize(identifier, protocol, name, icon) ⇒ Device
constructor
A new instance of Device.
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
#icon ⇒ Object (readonly)
Returns the value of attribute icon.
7 8 9 |
# File 'lib/druzy/protocol/device.rb', line 7 def icon @icon end |
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
7 8 9 |
# File 'lib/druzy/protocol/device.rb', line 7 def identifier @identifier end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/druzy/protocol/device.rb', line 7 def name @name end |
#protocol ⇒ Object (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 |