Class: Knockoff::Base
- Inherits:
-
Object
- Object
- Knockoff::Base
- Defined in:
- lib/knockoff/base.rb
Instance Attribute Summary collapse
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize(target, check_transaction: true) ⇒ Base
constructor
A new instance of Base.
- #run(&block) ⇒ Object
Constructor Details
#initialize(target, check_transaction: true) ⇒ Base
Returns a new instance of Base.
5 6 7 |
# File 'lib/knockoff/base.rb', line 5 def initialize(target, check_transaction: true) @target = decide_with(target, check_transaction) end |
Instance Attribute Details
#target ⇒ Object (readonly)
Returns the value of attribute target.
3 4 5 |
# File 'lib/knockoff/base.rb', line 3 def target @target end |
Instance Method Details
#run(&block) ⇒ Object
9 10 11 |
# File 'lib/knockoff/base.rb', line 9 def run(&block) run_on @target, &block end |