Class | Webgen::Configuration |
In: |
lib/webgen/configuration.rb
|
Parent: | Object |
Stores the configuration for a webgen website.
Configuration options should be created like this:
config.my.new.config 'value', :doc => 'some', :meta => 'info'
and later accessed or set using the accessor methods #[] and #[]= or a configuration helper. These helpers are defined in the Helpers module and provide easier access to complex configuration options. Also see the webgen manual for information about the configuration helpers.
data | [R] | The configuration options hash. |
meta_info | [R] | The hash which stores the meta info for the configuration options. |
Create a new Configuration object.
# File lib/webgen/configuration.rb, line 122 122: def initialize 123: @data = {} 124: @meta_info = {} 125: end
Return the configuration option name.
# File lib/webgen/configuration.rb, line 128 128: def [](name) 129: if @data.has_key?(name) 130: @data[name] 131: else 132: raise ArgumentError, "No such configuration option: #{name}" 133: end 134: end