Class: VerifiedDouble::MethodSignature::ClassValue
- Defined in:
- lib/verified_double/method_signature/class_value.rb
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 |
# File 'lib/verified_double/method_signature/class_value.rb', line 4 def belongs_to?(other) self.content == other.content || self.content.is_a?(other.content) end |
#content_as_instance ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/verified_double/method_signature/class_value.rb', line 8 def content_as_instance begin content.new rescue NoMethodError Object.new end end |