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


51
52
53
# File 'app/api/core/abilities.rb', line 51

def initialize
  @recorded = []
end

Instance Method Details

#play_back(target) ⇒ Object


55
56
57
# File 'app/api/core/abilities.rb', line 55

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

#record(&block) ⇒ Object


59
60
61
# File 'app/api/core/abilities.rb', line 59

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