README.md in config_yml-0.0.1 vs README.md in config_yml-0.0.2

- old
+ new

@@ -6,10 +6,33 @@ Description ----------- config.yml provides a very simple way of configure your ruby applications through yaml files. +Installation +------------ + +If you are using Bundler, add the following code to your Gemfile: +```ruby +gem "config_yml", :require => "configuration" +``` + +and run: +```console +$ bundle install +``` + +If you are not using Bundler: +```console +$ gem install config_yml +``` + +then in your Ruby code: +```ruby +require "configuration" +``` + Examples -------- ```yaml # config/redis.yml @@ -26,10 +49,14 @@ end ENV["REDIS_URL"] # => "redis://:foo@localhost:6379/bar" ``` +You can also use the shorthand: +```ruby +redis = Conf.redis +``` #### Environment based: ```yaml # config/mysql.yml @@ -64,21 +91,21 @@ #### Nested: ```yaml -# config/russian_doll.yml +# config/matryoshka.yml foo: bar: baz: array: - :red - :green - :blue ``` ```ruby -Configuration.russian_doll[:foo][:bar][:baz] # => { :array => [:red, :green, :blue] } +Configuration.matryoshka[:foo][:bar][:baz] # => { :array => [:red, :green, :blue] } ``` License -------