Sha256: 963ae2d253ab5831f22682cc8fbf2c65bb06617cd1c9090d71ada78b63f7c5d6

Contents?: true

Size: 389 Bytes

Versions: 2

Compression:

Stored size: 389 Bytes

Contents

module Rstatsd
  attr_accessor :configuration
  
  def self.configure
    configuration ||= Configuration.new()
    yield(configuration)
    @configuration = configuration
  end

  class Configuration
    attr_accessor :redis_db, :redis_host

    def initialize
      @redis_db = 1
      @redis_host = '127.0.0.1:6379'
    end

    def [](option)
      send(option)
    end
  end
end
    

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rstatsd-0.3 lib/rstatsd/config.rb
rstatsd-0.2 lib/rstatsd/config.rb