Class: DuckTesting::MethodCallData

Inherits:
Object
  • Object
show all
Defined in:
lib/duck_testing/method_call_data.rb

Instance Method Summary collapse

Constructor Details

#initialize(receiver, method_name) ⇒ MethodCallData

Returns a new instance of MethodCallData.

Parameters:

  • the receiver object.

  • the invoked method's name.



5
6
7
8
# File 'lib/duck_testing/method_call_data.rb', line 5

def initialize(receiver, method_name)
  @receiver = receiver
  @method_name = method_name
end

Instance Method Details

#method_exprString

Returns:



11
12
13
# File 'lib/duck_testing/method_call_data.rb', line 11

def method_expr
  "#{receiver.class.name}##{method_name}"
end