Class: Barometer::Utils::Payload

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/barometer/utils/payload.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash, query = nil) ⇒ Payload

Returns a new instance of Payload.



9
10
11
12
# File 'lib/barometer/utils/payload.rb', line 9

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

Instance Attribute Details

#queryObject (readonly)

Returns the value of attribute query.



7
8
9
# File 'lib/barometer/utils/payload.rb', line 7

def query
  @query
end

Instance Method Details

#unitsObject



14
15
16
# File 'lib/barometer/utils/payload.rb', line 14

def units
  query.units if query
end