Module: ViewTrail

Defined in:
lib/view_trail.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Constant Summary collapse

@@whodiddit =
nil

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



7
8
9
10
# File 'lib/view_trail.rb', line 7

def self.included(base)
  base.send :extend, ClassMethods
  base.before_filter :set_whodiddit
end

.whodidditObject



12
13
14
# File 'lib/view_trail.rb', line 12

def self.whodiddit
  @@whodiddit.respond_to?(:call) ? @@whodiddit.call : @@whodiddit
end

.whodiddit=(value) ⇒ Object



16
17
18
# File 'lib/view_trail.rb', line 16

def self.whodiddit=(value)
  @@whodiddit = value
end