Module: Webgen::WebsiteAccess
- Included in:
- Common::Sitemap, ContentProcessor::Context, ContentProcessor::Erubis, ContentProcessor::Tags, Node, Output::FileSystem, Source::Resource, SourceHandler::Copy, SourceHandler::Feed, SourceHandler::Fragment, SourceHandler::Main, SourceHandler::Metainfo, SourceHandler::Page, SourceHandler::Sitemap, SourceHandler::Template, SourceHandler::Virtual, Tag::Base, Tag::BreadcrumbTrail, Tag::Coderay, Tag::IncludeFile, Tag::Langbar, Tag::Menu, Tag::Sitemap, Tree
- Defined in:
- lib/webgen/websiteaccess.rb
Overview
Mixed into modules/classes that need access to the current website object.
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
-
.included(klass) ⇒ Object
:nodoc:.
-
.website ⇒ Object
Return the current website object or
nil.
Class Method Details
.included(klass) ⇒ Object
:nodoc:
16 17 18 19 |
# File 'lib/webgen/websiteaccess.rb', line 16 def self.included(klass) #:nodoc: super klass.extend(ClassMethods) end |
.website ⇒ Object
Return the current website object or nil.
22 23 24 |
# File 'lib/webgen/websiteaccess.rb', line 22 def website Thread.current[:webgen_website] end |