Sha256: b236e6314e81ff23de63a1370179c3ece4df04401aa704fcd4d1c5043c3f83c6

Contents?: true

Size: 315 Bytes

Versions: 3

Compression:

Stored size: 315 Bytes

Contents

require 'delegate'
require 'choc_mool'

module Barometer
  module Utils
    class Payload < SimpleDelegator
      attr_reader :query

      def initialize(hash, query=nil)
        @query = query
        super( ChocMool.new(hash) )
      end

      def units
        query.units if query
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
barometer-0.9.7 lib/barometer/utils/payload.rb
barometer-0.9.6 lib/barometer/utils/payload.rb
barometer-0.9.5 lib/barometer/utils/payload.rb