Parent

Methods

Included Modules

Class Index [+]

Quicksearch

Webgen::Configuration

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.

Attributes

meta_info[R]

The hash which stores the meta info for the configuration options.

data[R]

The configuration options hash.

Public Class Methods

new() click to toggle source

Create a new Configuration object.

     # File lib/webgen/configuration.rb, line 122
122:     def initialize
123:       @data = {}
124:       @meta_info = {}
125:     end

Public Instance Methods

[](name) click to toggle source

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
[]=(name, value) click to toggle source

Set the configuration option name to the provided value.

     # File lib/webgen/configuration.rb, line 137
137:     def []=(name, value)
138:       if @data.has_key?(name)
139:         @data[name] = value
140:       else
141:         raise ArgumentError, "No such configuration option: #{name}"
142:       end
143:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.