Class: Hardmock::ReplacedMethod

Inherits:
Object
  • Object
show all
Defined in:
lib/hardmock/stubbing.rb

Overview

:nodoc:#

Direct Known Subclasses

StubbedMethod

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target, method_name) ⇒ ReplacedMethod

Returns a new instance of ReplacedMethod.



58
59
60
61
62
63
# File 'lib/hardmock/stubbing.rb', line 58

def initialize(target, method_name)
  @target = target
  @method_name = method_name

  Hardmock.track_replaced_method self
end

Instance Attribute Details

#method_nameObject (readonly)

Returns the value of attribute method_name.



56
57
58
# File 'lib/hardmock/stubbing.rb', line 56

def method_name
  @method_name
end

#targetObject (readonly)

Returns the value of attribute target.



56
57
58
# File 'lib/hardmock/stubbing.rb', line 56

def target
  @target
end