Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dbackowski/simple_configurable

Simple configuration module for specifying the configuration attributes of a class using a very simple syntax.
https://github.com/dbackowski/simple_configurable

class-configuration configuration gem ruby

Last synced: about 2 months ago
JSON representation

Simple configuration module for specifying the configuration attributes of a class using a very simple syntax.

Awesome Lists containing this project

README

        

# SimpleConfigurable [![Build Status](https://travis-ci.org/dbackowski/simple_configurable.svg?branch=master)](https://travis-ci.org/dbackowski/simple_configurable)

Simple configuration module for specifying the configuration attributes of a class using a very simple syntax.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'simple_configurable'
```

And then execute:

$ bundle

Or install it yourself as:

$ gem install simple_configurable

## Usage

```ruby
class Test
include SimpleConfigurable.with :enabled, :email
end

Test.configure do |config|
config.enabled = true
config.email = '[email protected]'
end

Test.config
=> #<#:0x00000001c5c870 @enabled=true, @email="[email protected]">
```

## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).