Define settings for your library.
Installation
Add this line to your application's Gemfile:
gem "seteable"
And then execute:
$ bundle
Or install it yourself as:
$ gem install seteable
Usage
Use the settings
method to set and get values:
class Base
include Seteable
end
Base.settings[:foo] = "foo"
Base.settings[:foo] # => "foo"
Base.new.settings[:foo] # => "foo"
Base.set(:bar, "bar")
Base.settings[:bar] # => "bar"
Settings are inherited:
class Parent
include Seteable
settings[:foo] = "foo"
end
class Child < Parent
settings[:bar] = "bar"
end
Child.settings[:foo] # => "foo"
Child.settings[:bar] # => "bar"
Contributing
Fork the project with:
$ git clone git@github.com:frodsan/seteable.git
To install dependencies, use:
$ bundle install
To run the test suite, do:
$ rake test
For bug reports and pull requests use GitHub.
License
Seteable is released under the MIT License.