module TrustyCms
def config # method must be defined before any initializers run
end
config['other.thing'] = 'nothing'
config.define 'something', default => 'something'
TrustyCms.config do |config|
but it will also yield itself to a block:
TrustyCms.config['site.url'] = 'example.com'
TrustyCms.config['site.title']
Returns the TrustyCms::Config eigenclass object, so it can be used wherever you would use TrustyCms::Config.
def config # method must be defined before any initializers run yield TrustyCms::Config if block_given? TrustyCms::Config end