Class: VerifiedDouble::MethodSignature::InstanceValue
- Defined in:
- lib/verified_double/method_signature/instance_value.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Value
Instance Method Summary collapse
Methods inherited from Value
#content_class, from, #initialize, #recommended_value
Constructor Details
This class inherits a constructor from VerifiedDouble::MethodSignature::Value
Instance Method Details
#belongs_to?(other) ⇒ Boolean
4 5 6 7 8 9 10 |
# File 'lib/verified_double/method_signature/instance_value.rb', line 4 def belongs_to?(other) if other.is_a?(MethodSignature::InstanceValue) self.content == other.content else self.content_class.ancestors.include?(other.content) end end |
#content_as_instance ⇒ Object
12 13 14 |
# File 'lib/verified_double/method_signature/instance_value.rb', line 12 def content_as_instance self.content end |