Class: Spy::CallLog

Inherits:
Object
  • Object
show all
Defined in:
lib/spy/call_log.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object, called_from, args, kwargs, block, result) ⇒ CallLog

Returns a new instance of CallLog.



25
26
27
# File 'lib/spy/call_log.rb', line 25

def initialize(object, called_from, args, kwargs, block, result)
  @object, @called_from, @args, @kwargs, @block, @result = object, called_from, args, kwargs, block, result
end

Instance Attribute Details

#argsArray (readonly)

Returns arguments were sent to the method.

Returns:

  • (Array)

    arguments were sent to the method



# File 'lib/spy/call_log.rb', line 4

#blockProc (readonly)

Returns the block that was sent to the method.

Returns:

  • (Proc)

    the block that was sent to the method



# File 'lib/spy/call_log.rb', line 4

#called_fromString (readonly)

Returns where the method was called from.

Returns:

  • (String)

    where the method was called from



# File 'lib/spy/call_log.rb', line 4

#kwargsArray (readonly)

Returns keyword arguments were sent to the method.

Returns:

  • (Array)

    keyword arguments were sent to the method



# File 'lib/spy/call_log.rb', line 4

#objectObject (readonly)

Returns object that the method was called from.

Returns:

  • (Object)

    object that the method was called from



# File 'lib/spy/call_log.rb', line 4

#resultObject (readonly)

Returns The result of the method of being stubbed, or called through.

Returns:

  • The result of the method of being stubbed, or called through



# File 'lib/spy/call_log.rb', line 4