Configuration file parser
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
.gitignore
Gemfile
Gemfile.lock
README.md
confy.gemspec

README.md

Confy

Reads configuration-like files and makes them Object-like.

Backends

  • xml
  • json
  • yaml
  • 'simple' (e.g. x=1)

Examples

# Given an generic conf file:
# name=james\nage=42
Confy.parse("/path/to/person.xyz", :as => "SimpleAssignment").name
# => "james"

# Given an XML file:
# <person><address><city>Birmingham</city></address></perso>
Confy.parse("/path/to/person.xml").person.address.city
# => "Birmingham"