Class: SilverlineAPI::Axis

Inherits:
Object
  • Object
show all
Defined in:
lib/librato_silverline_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#allocationObject

Returns the value of attribute allocation.



195
196
197
# File 'lib/librato_silverline_api.rb', line 195

def allocation
  @allocation
end

#maxObject

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