Class: VerifiedDouble::RecordedMethodSignature

Inherits:
MethodSignature show all
Defined in:
lib/verified_double/recorded_method_signature.rb

Instance Attribute Summary collapse

Attributes inherited from MethodSignature

#args, #class_name, #method, #method_operator, #return_values

Instance Method Summary collapse

Methods inherited from MethodSignature

#belongs_to?, #eql?, #hash, #recommended_verified_signature

Constructor Details

#initialize(*args) ⇒ RecordedMethodSignature

Returns a new instance of RecordedMethodSignature.



5
6
7
8
# File 'lib/verified_double/recorded_method_signature.rb', line 5

def initialize(*args)
  @stack_frame = StackFrame.new(caller(0).detect{|line| line =~ %r{/spec/} })
  super(*args)
end

Instance Attribute Details

#stack_frameObject (readonly)

Returns the value of attribute stack_frame.



3
4
5
# File 'lib/verified_double/recorded_method_signature.rb', line 3

def stack_frame
  @stack_frame
end

Instance Method Details

#to_sObject



10
11
12
# File 'lib/verified_double/recorded_method_signature.rb', line 10

def to_s
  "#{super}\n  # #{stack_frame}"
end