Class: Core::Abilities::Base::Recorder

Inherits:
Object
  • Object
show all
Defined in:
app/api/core/abilities.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initializeRecorder

Returns a new instance of Recorder.


53
54
55
# File 'app/api/core/abilities.rb', line 53

def initialize
  @recorded = []
end

Instance Method Details

#play_back(target) ⇒ Object


57
58
59
# File 'app/api/core/abilities.rb', line 57

def play_back(target)
  @recorded.each { |block| target.instance_eval(&block) }
end

#record(&block) ⇒ Object


61
62
63
# File 'app/api/core/abilities.rb', line 61

def record(&block)
  @recorded << block
end