Class: Barometer::Utils::Payload
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Barometer::Utils::Payload
- Defined in:
- lib/barometer/utils/payload.rb
Instance Attribute Summary collapse
-
#query ⇒ Object
readonly
Returns the value of attribute query.
Instance Method Summary collapse
-
#initialize(hash, query = nil) ⇒ Payload
constructor
A new instance of Payload.
- #units ⇒ Object
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
#query ⇒ Object (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
#units ⇒ Object
14 15 16 |
# File 'lib/barometer/utils/payload.rb', line 14 def units query.units if query end |