Class: VerifiedDouble::RecordedMethodSignature
- Inherits:
-
MethodSignature
- Object
- MethodSignature
- VerifiedDouble::RecordedMethodSignature
- Defined in:
- lib/verified_double/recorded_method_signature.rb
Instance Attribute Summary collapse
-
#stack_frame ⇒ Object
readonly
Returns the value of attribute stack_frame.
Attributes inherited from MethodSignature
#args, #class_name, #method, #method_operator, #return_values
Instance Method Summary collapse
-
#initialize(*args) ⇒ RecordedMethodSignature
constructor
A new instance of RecordedMethodSignature.
- #to_s ⇒ Object
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_frame ⇒ Object (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_s ⇒ Object
10 11 12 |
# File 'lib/verified_double/recorded_method_signature.rb', line 10 def to_s "#{super}\n # #{stack_frame}" end |