Method: Webgen::Context#initialize

Defined in:
lib/webgen/context.rb

#initialize(website, options = {}, persistent = {}) ⇒ Context

Create a new Context object belonging to the website object website.

All modules listed in the array ‘website.ext.context_modules’ are automatically used to extend the Context object.

The following options are set by default and can be overridden via the options hash:

:content

Is set to an empty string.



73
74
75
76
77
78
# File 'lib/webgen/context.rb', line 73

def initialize(website, options = {}, persistent = {})
  @website = website
  (website.ext.context_modules || []).each {|m| self.extend(m)}
  @options = {:content => '', :chain => []}.merge(options)
  @persistent = persistent
end