Class: Tarquinn::Condition::ProcRunner Private

Inherits:
Tarquinn::Condition show all
Defined in:
lib/tarquinn/condition/proc_runner.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Checks condition based on a given block

Instance Method Summary collapse

Methods inherited from Tarquinn::Condition

action_checker, method_caller, proc_runner

Constructor Details

#initialize(&block) ⇒ ProcRunner

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of ProcRunner.



9
10
11
# File 'lib/tarquinn/condition/proc_runner.rb', line 9

def initialize(&block)
  @block = block
end

Instance Method Details

#check?(controller) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


13
14
15
# File 'lib/tarquinn/condition/proc_runner.rb', line 13

def check?(controller)
  controller.run(&block)
end