0.0
No commit activity in last 3 years
No release in over 3 years
A general purpose config utility to simplify and standardize configuration of ruby libraries.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
 Project Readme

Gem Version Code Climate Test Coverage Build Status

ribbon-config

A general purpose configuration utility to simplify and standardize configuration of ruby libraries.

Installation

Add this to your Gemfile:

gem 'ribbon-config'

Then run

bundle

Or you can install it manually:

gem install ribbon-config

Basic Usage

config = Ribbon::Config.new {
  ##
  # Key-Values.
  # Must be namespaced.
  namespace.key = 'value'
  another_namespace.some_config_value = 'can be any object, including nil'
  
  ##
  # Arrays
  an_array 1
  an_array 2
  an_array 3
  
  proc_array { 'one' }
  proc_array { :two }
  proc_array { 3 }
  proc_array { |a| a }
}

config.namespace.key # => 'value'
config.another_namespace.some_config_value # => 'can be any object, including nil'
config.an_array # => [1, 2, 3]
config.proc_array.call('4') # => ['one', :two, 3, '4']