Module: Webgen::WebsiteAccess

Included in:
Common::Sitemap, ContentProcessor::Fragments, ContentProcessor::Tags, Context, Node, Output::FileSystem, Source::Resource, SourceHandler::Copy, SourceHandler::Directory, SourceHandler::Feed, SourceHandler::Fragment, SourceHandler::Main, SourceHandler::Memory, SourceHandler::Metainfo, SourceHandler::Page, SourceHandler::Sitemap, SourceHandler::Template, SourceHandler::Virtual, Tag::Base, Tag::BreadcrumbTrail, Tag::Coderay, Tag::IncludeFile, Tag::Langbar, Tag::Menu, Tag::Sitemap, Tag::TikZ, Tree
Defined in:
lib/webgen/websiteaccess.rb

Overview

Should be mixed into modules/classes that need access to the current website object.

Defined Under Namespace

Modules: ClassMethods

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Object) included(klass)

:nodoc:



18
19
20
21
# File 'lib/webgen/websiteaccess.rb', line 18

def self.included(klass) #:nodoc:
  super
  klass.extend(ClassMethods)
end

Instance Method Details

- (Object) website

Return the current website object or nil.



24
25
26
# File 'lib/webgen/websiteaccess.rb', line 24

def website
  Thread.current[:webgen_website]
end