class Librato::Space
Public Instance Methods
charts()
click to toggle source
# File lib/librato/space.rb, line 14 def charts @charts ||= fetch.map { |data| Chart.new(client, self, data) } end
id()
click to toggle source
# File lib/librato/space.rb, line 6 def id data['id'] || fail("Unknown id: #{data}") end
name()
click to toggle source
# File lib/librato/space.rb, line 10 def name data['name'] end
path()
click to toggle source
# File lib/librato/space.rb, line 18 def path "/v1/spaces/#{data['id']}/charts" end
Private Instance Methods
fetch()
click to toggle source
# File lib/librato/space.rb, line 24 def fetch JSON.parse(client.get(path).body) end