Structura
Configuration File Reader Gem
Installation
Add this line to your application's Gemfile:
gem 'structura'
And then execute:
$ bundle
Or install it yourself as:
$ gem install structura
Usage
require 'structura'
Structura::Cfg.instance.load_file 'config.yaml'
p Structura::Cfg.instance.read_value('section_one', 'value_one')
p Structura::Cfg.instance.read_value('section_one', 'value_two')
The Configuration File Format
section_one:
:value_one: "1.1"
:value_two: "1.2"
section_two:
:value_one: '2.1'
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request