Module: Webgen::WebsiteAccess

Overview

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

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

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

.websiteObject

Return the current website object or nil.



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

def website
  Thread.current[:webgen_website]
end