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

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request