Class: VerifiedDouble::MethodSignature
- Inherits:
-
Object
- Object
- VerifiedDouble::MethodSignature
- Defined in:
- lib/verified_double/method_signature.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#method ⇒ Object
Returns the value of attribute method.
-
#recording_double ⇒ Object
Returns the value of attribute recording_double.
-
#return_value ⇒ Object
Returns the value of attribute return_value.
Instance Method Summary collapse
-
#initialize(recording_double) ⇒ MethodSignature
constructor
A new instance of MethodSignature.
- #to_s ⇒ Object
Constructor Details
#initialize(recording_double) ⇒ MethodSignature
Returns a new instance of MethodSignature.
5 6 7 |
# File 'lib/verified_double/method_signature.rb', line 5 def initialize(recording_double) @recording_double = recording_double end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
3 4 5 |
# File 'lib/verified_double/method_signature.rb', line 3 def args @args end |
#method ⇒ Object
Returns the value of attribute method.
3 4 5 |
# File 'lib/verified_double/method_signature.rb', line 3 def method @method end |
#recording_double ⇒ Object
Returns the value of attribute recording_double.
3 4 5 |
# File 'lib/verified_double/method_signature.rb', line 3 def recording_double @recording_double end |
#return_value ⇒ Object
Returns the value of attribute return_value.
3 4 5 |
# File 'lib/verified_double/method_signature.rb', line 3 def return_value @return_value end |
Instance Method Details
#to_s ⇒ Object
9 10 11 12 13 14 |
# File 'lib/verified_double/method_signature.rb', line 9 def to_s result = [ "#{recording_double.class_name}#{recording_double.method_operator}#{method}(#{args && args.map(&:class).join(', ')})", return_value && return_value.class] result.compact.join("=>") end |