Class: Filigree::LiteralPattern
- Inherits:
-
SingleObjectPattern
- Object
- BasicPattern
- SingleObjectPattern
- Filigree::LiteralPattern
- Defined in:
- lib/filigree/match.rb
Overview
A pattern that forces an equality comparison
Instance Method Summary collapse
-
#match?(object, _) ⇒ Boolean
Test the object for equality to the pattern element.
Methods inherited from SingleObjectPattern
Methods included from AbstractClass
#abstract_method, extended, #install_icvars, #new
Methods inherited from BasicPattern
Constructor Details
This class inherits a constructor from Filigree::SingleObjectPattern
Instance Method Details
#match?(object, _) ⇒ Boolean
Test the object for equality to the pattern element.
346 347 348 |
# File 'lib/filigree/match.rb', line 346 def match?(object, _) object == @pattern_elem end |