Class: BothIsGood::ImplementedTwice

Inherits:
Object
  • Object
show all
Defined in:
lib/both_is_good/implemented_twice.rb

Instance Method Summary collapse

Constructor Details

#initialize(owner, original:, replacement:, **opts) ⇒ ImplementedTwice

Returns a new instance of ImplementedTwice.



3
4
5
6
# File 'lib/both_is_good/implemented_twice.rb', line 3

def initialize(owner, original:, replacement:, **opts)
  base = owner.both_is_good_configuration
  @local_config = LocalConfiguration.new(base, owner:, original:, replacement:, **opts)
end

Instance Method Details

#call(target, *args, **kwargs) ⇒ Object



8
9
10
# File 'lib/both_is_good/implemented_twice.rb', line 8

def call(target, *args, **kwargs)
  Invocation.new(@local_config, target, args, kwargs).run
end