class TrustyCms::Config
def namespace(prefix, options = {}, &block)
end
end
secret.define('longing', :default => 'vindication') # defines 'secret.longing'
secret.define('lair', :default => 'batcave') # defines 'secret.lair'
secret.define('identity', :default => 'batman') # defines 'secret.identity'
config.namespace('secret', :allow_display => false) do |secret|
TrustyCms.config do |config|
A convenient drying method for specifying a prefix and options common to several settings.
def namespace(prefix, options = {}, &block) prefix = [options[:prefix], prefix].join('.') if options[:prefix] with_options(options.merge(:prefix => prefix), &block) end