Class: SilverlineAPI::Axis
- Inherits:
-
Object
- Object
- SilverlineAPI::Axis
- Defined in:
- lib/librato_silverline_api.rb
Instance Attribute Summary collapse
-
#allocation ⇒ Object
Returns the value of attribute allocation.
-
#max ⇒ Object
Returns the value of attribute max.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Axis
constructor
A new instance of Axis.
- #to_json(x = nil) ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ Axis
Returns a new instance of Axis.
197 198 199 200 |
# File 'lib/librato_silverline_api.rb', line 197 def initialize(args = {}) @allocation = args && args[:allocation] ? args[:allocation] : "unlimited" @max = args && args[:max] ? args[:max] : nil end |
Instance Attribute Details
#allocation ⇒ Object
Returns the value of attribute allocation.
195 196 197 |
# File 'lib/librato_silverline_api.rb', line 195 def allocation @allocation end |
#max ⇒ Object
Returns the value of attribute max.
195 196 197 |
# File 'lib/librato_silverline_api.rb', line 195 def max @max end |
Instance Method Details
#to_json(x = nil) ⇒ Object
202 203 204 205 206 207 |
# File 'lib/librato_silverline_api.rb', line 202 def to_json(x = nil) { :allocation => @allocation, :max => @max }.to_json end |