Sha256: e0a1fbbb71a7262e581423c7ace413d8f0517cce9ae93d3c04da25efe397af2a
Contents?: true
Size: 613 Bytes
Versions: 13
Compression:
Stored size: 613 Bytes
Contents
# -*- encoding: utf-8 -*- module Webgen # Should be mixed into modules/classes that need access to the current website object. module WebsiteAccess # The methods of this module are available on classes that include WebsiteAccess. module ClassMethods # See WebsiteAccess.website def website WebsiteAccess.website end end def self.included(klass) #:nodoc: super klass.extend(ClassMethods) end # Return the current website object or +nil+. def website Thread.current[:webgen_website] end module_function :website end end
Version data entries
13 entries across 13 versions & 3 rubygems