Class: Tarquinn::Condition::ProcRunner
- Inherits:
-
Object
- Object
- Tarquinn::Condition::ProcRunner
- Defined in:
- lib/tarquinn/condition/proc_runner.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
Instance Method Summary collapse
- #check?(controller) ⇒ Boolean
-
#initialize(&block) ⇒ ProcRunner
constructor
A new instance of ProcRunner.
Constructor Details
#initialize(&block) ⇒ ProcRunner
Returns a new instance of ProcRunner.
4 5 6 |
# File 'lib/tarquinn/condition/proc_runner.rb', line 4 def initialize(&block) @block = block end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
2 3 4 |
# File 'lib/tarquinn/condition/proc_runner.rb', line 2 def block @block end |
Instance Method Details
#check?(controller) ⇒ Boolean
8 9 10 |
# File 'lib/tarquinn/condition/proc_runner.rb', line 8 def check?(controller) block.yield(controller) end |