module Metrico

Constants

VERSION

Attributes

config[RW]

Public Class Methods

client() click to toggle source
# File lib/metrico.rb, line 17
def client
  @client ||= Client.new
end
configure() { |config| ... } click to toggle source
# File lib/metrico.rb, line 12
def configure
  self.config ||= Config.new
  yield(config)
end
enabled?() click to toggle source
# File lib/metrico.rb, line 21
def enabled?
  self.config && self.config.enabled
end
push(name, fields, tags = {}) click to toggle source
# File lib/metrico.rb, line 25
def push(name, fields, tags = {})
  point = Point.new(name, fields, tags)
  client.push(point) if enabled?
end