Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Configure offers an easy way for configure your application using a DSL.
Ruby
tag: v0.1.0

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
LICENSE
README.rdoc
Rakefile
configure.gemspec

README.rdoc

Configure

Configure offers an easy way for configure your application using a DSL. It provides a single-method interface that receives a block and returns well-structured configuration values.

Usage

The most simple way configure can be used is to pass a block to the Configure.process method and receive back a hash with the configuration values.

laser = Configure.process do
  title "red laser"
  wave_length 700
end

laser == {
  :title => "red laser",
  :wave_length => 700
} # => true

It is also possible to pass blocks to configuration keys and combine multiple values to an array.

laser = Configure.process do
  title "red and violet pulse laser"
  pulses do
    wave_length 700
    duration 20
  end
  pulses do
    wave_length 400
    duration 20
  end
end

laser == {
  :title => "red and violet pulse laser",
  :pulses => [
    { :wave_length => 700, :duration => 20 },
    { :wave_length => 400, :duration => 20 }
  ]
} # => true

Development

Development has been done test-driven and the code follows at most the Clean Code paradigms. Code smells has been removed by using the reek code smell detector.

This project is still under development. Any bug report and contribution is welcome!

Support

Apart from contribution, support via Flattr is welcome.

Something went wrong with that request. Please try again.