Class: Shaped::Shapes::Equality
- Inherits:
-
Shaped::Shape
- Object
- Shaped::Shape
- Shaped::Shapes::Equality
- Defined in:
- lib/shaped/shapes/equality.rb
Instance Method Summary collapse
-
#initialize(shape_description) ⇒ Equality
constructor
A new instance of Equality.
- #matched_by?(object) ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(shape_description) ⇒ Equality
Returns a new instance of Equality.
4 5 6 |
# File 'lib/shaped/shapes/equality.rb', line 4 def initialize(shape_description) @expected_value = shape_description end |
Instance Method Details
#matched_by?(object) ⇒ Boolean
8 9 10 |
# File 'lib/shaped/shapes/equality.rb', line 8 def matched_by?(object) object == @expected_value end |
#to_s ⇒ Object
12 13 14 |
# File 'lib/shaped/shapes/equality.rb', line 12 def to_s @expected_value.inspect end |