Class: WeatherLink::Node
- Inherits:
-
HashWrapper
- Object
- SimpleDelegator
- HashWrapper
- WeatherLink::Node
- Defined in:
- lib/weatherlink/node.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Attributes inherited from HashWrapper
Instance Method Summary collapse
- #description ⇒ Object
-
#initialize(client, data) ⇒ Node
constructor
A new instance of Node.
- #inspect ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(client, data) ⇒ Node
Returns a new instance of Node.
7 8 9 10 |
# File 'lib/weatherlink/node.rb', line 7 def initialize(client, data) @client = client super(data) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class WeatherLink::HashWrapper
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
5 6 7 |
# File 'lib/weatherlink/node.rb', line 5 def client @client end |
Instance Method Details
#description ⇒ Object
20 21 22 |
# File 'lib/weatherlink/node.rb', line 20 def description "#{station_name} - #{node_name}" end |
#inspect ⇒ Object
16 17 18 |
# File 'lib/weatherlink/node.rb', line 16 def inspect to_s end |
#to_s ⇒ Object
12 13 14 |
# File 'lib/weatherlink/node.rb', line 12 def to_s "#<#{self.class.name} device_id_hex=#{device_id_hex} (#{description})>" end |