Sha256: 43fb38305dae9a3fc0677327fb491d6914885852018cf464a38690c0ddc893c9

Contents?: true

Size: 398 Bytes

Versions: 4

Compression:

Stored size: 398 Bytes

Contents

# frozen_string_literal: true

module WeatherLink
  class Node < HashWrapper
    attr_reader :client

    def initialize(client, data)
      @client = client
      super(data)
    end

    def to_s
      "#<#{self.class.name} device_id_hex=#{device_id_hex} (#{description})>"
    end

    def inspect
      to_s
    end

    def description
      "#{station_name} - #{node_name}"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
weatherlink-0.1.3 lib/weatherlink/node.rb
weatherlink-0.1.2 lib/weatherlink/node.rb
weatherlink-0.1.1 lib/weatherlink/node.rb
weatherlink-0.1.0 lib/weatherlink/node.rb