Project

seteable

0.0
No commit activity in last 3 years
No release in over 3 years
Define settings for your library
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 5.8
~> 11.0
~> 0.39
 Project Readme

Seteable Build Status

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.