class Remnant::Configuration

Attributes

custom_hook[R]

allow applications to run custom code with stats

env[R]

environment of application

hostname[R]

hostname to send to

port_number[R]

port to send to

sample_rate[R]

how often to use results

tag[R]

api key to use with payloads

Public Instance Methods

defaults!() click to toggle source
# File lib/remnant/configuration.rb, line 45
def defaults!
  # configure some defaults

  @hostname = '127.0.0.1'
  @port_number = 8125
  @tag = 'remnant'
  @sample_rate = 10

  self
end
environment(value) click to toggle source
# File lib/remnant/configuration.rb, line 33
def environment(value)
  @env = value
end
hook(&block) click to toggle source
# File lib/remnant/configuration.rb, line 41
def hook(&block)
  @custom_hook = block
end
host(value) click to toggle source
# File lib/remnant/configuration.rb, line 21
def host(value)
  @hostname = value
end
port(value) click to toggle source
# File lib/remnant/configuration.rb, line 25
def port(value)
  @port_number = value
end
sample(value) click to toggle source
# File lib/remnant/configuration.rb, line 37
def sample(value)
  @sample_rate = value
end
tagged(value) click to toggle source
# File lib/remnant/configuration.rb, line 29
def tagged(value)
  @tag = value
end