jxe / configurer

a new take on ruby app-wide and class-based configuration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

configurer

# to use in your class

class Foo
  extend Configurer
  config :redis do Redis.new end

  def bar
    redis.set "foo", "bar"
  end
end

# to set globally

WORLDWIDE.redis { Redis.new($options) }

# or to set just for foo

Foo.config.redis { Redis.new($local_options) }

Copyright © 2010 Joe Edelman, Citizen Logistics, Inc. See LICENSE for details.

About

a new take on ruby app-wide and class-based configuration

License:MIT License


Languages

Language:Ruby 100.0%