Class: Knockoff::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/knockoff/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#targetObject (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