Class: Xcprofiler::BlockReporter
- Inherits:
-
AbstractReporter
- Object
- AbstractReporter
- Xcprofiler::BlockReporter
- Defined in:
- lib/xcprofiler/reporters/block_reporter.rb
Constant Summary
Constants inherited from AbstractReporter
AbstractReporter::DEFAULT_TRUNCATE_AT
Instance Attribute Summary
Attributes inherited from AbstractReporter
Instance Method Summary collapse
-
#initialize(options = {}, &block) ⇒ BlockReporter
constructor
A new instance of BlockReporter.
- #report!(executions) ⇒ Object
Methods inherited from AbstractReporter
Constructor Details
#initialize(options = {}, &block) ⇒ BlockReporter
Returns a new instance of BlockReporter.
3 4 5 6 7 |
# File 'lib/xcprofiler/reporters/block_reporter.rb', line 3 def initialize( = {}, &block) raise ArgumentError, '[BlockReporter] block must be passed' unless block_given? super() @block = block end |
Instance Method Details
#report!(executions) ⇒ Object
9 10 11 |
# File 'lib/xcprofiler/reporters/block_reporter.rb', line 9 def report!(executions) @block.call(executions) end |