Class: HomiePair
- Inherits:
-
Object
- Object
- HomiePair
- Defined in:
- lib/hodmin/hodmin_tools.rb
Overview
Class represents a pair of a Homie-Device and a firmware running on this device
Instance Attribute Summary collapse
-
#hdev ⇒ Object
readonly
Returns the value of attribute hdev.
-
#hfw ⇒ Object
readonly
Returns the value of attribute hfw.
Instance Method Summary collapse
-
#initialize(dev, *fw) ⇒ HomiePair
constructor
A new instance of HomiePair.
Constructor Details
#initialize(dev, *fw) ⇒ HomiePair
Returns a new instance of HomiePair.
207 208 209 210 211 |
# File 'lib/hodmin/hodmin_tools.rb', line 207 def initialize(dev, *fw) fw.flatten! @hdev = dev.nil? ? nil : dev @hfw = fw.empty? ? nil : fw.first end |
Instance Attribute Details
#hdev ⇒ Object (readonly)
Returns the value of attribute hdev.
206 207 208 |
# File 'lib/hodmin/hodmin_tools.rb', line 206 def hdev @hdev end |
#hfw ⇒ Object (readonly)
Returns the value of attribute hfw.
206 207 208 |
# File 'lib/hodmin/hodmin_tools.rb', line 206 def hfw @hfw end |