Module: Webgen::WebsiteAccess
- Included in:
- Common::Sitemap, ContentProcessor::Builder, ContentProcessor::Context, ContentProcessor::Erb, ContentProcessor::Erubis, ContentProcessor::Fragments, ContentProcessor::Haml, ContentProcessor::Tags, 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
-
.included(klass) ⇒ Object
:nodoc:.
-
.website ⇒ Object
Return the current website object or
nil
.
Class Method Details
.included(klass) ⇒ Object
:nodoc:
18 19 20 21 |
# File 'lib/webgen/websiteaccess.rb', line 18 def self.included(klass) #:nodoc: super klass.extend(ClassMethods) end |
.website ⇒ Object
Return the current website object or nil
.
24 25 26 |
# File 'lib/webgen/websiteaccess.rb', line 24 def website Thread.current[:webgen_website] end |