Parent

GraphiteAPI::Client::Proxy

Public Class Methods

new(client) click to toggle source
# File lib/graphite-api/client.rb, line 62
def initialize client
  @client, @keys = client, []
end

Public Instance Methods

method_missing(m, *args, &block) click to toggle source
# File lib/graphite-api/client.rb, line 66
def method_missing m, *args, &block
  if @keys.push(m).size > 10 
    super # too deep
  elsif args.any?
    @client.metrics Hash[
      @keys.join('.'), args.first
    ], *args[1..-1]
  else
    self
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.