Class: HomiePair

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#hdevObject (readonly)

Returns the value of attribute hdev.



206
207
208
# File 'lib/hodmin/hodmin_tools.rb', line 206

def hdev
  @hdev
end

#hfwObject (readonly)

Returns the value of attribute hfw.



206
207
208
# File 'lib/hodmin/hodmin_tools.rb', line 206

def hfw
  @hfw
end