Skip to content

Instantly share code, notes, and snippets.

@markbates
Created September 17, 2008 17:15
Show Gist options
  • Save markbates/11259 to your computer and use it in GitHub Desktop.
Save markbates/11259 to your computer and use it in GitHub Desktop.
# Setting parameters with Configatron 1.x:
configatron do |c|
c.foo = :bar
c.namespace(:mack) do |mack|
mack.hello = 'Hello'
end
end
# Setting parameters with Configatron 2.x:
configatron.foo = :bar
configatron.mack.hello = 'Hello'
# Getting parameters has not changed:
configatron.foo # => :bar
configatron.mack.hello # => 'Hello'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment