Class: Leftovers::Matchers::All
- Inherits:
-
Object
- Object
- Leftovers::Matchers::All
- Includes:
- ComparableInstance
- Defined in:
- lib/leftovers/matchers/all.rb
Instance Attribute Summary collapse
-
#matchers ⇒ Object
readonly
Returns the value of attribute matchers.
Instance Method Summary collapse
- #===(value) ⇒ Object
-
#initialize(matchers) ⇒ All
constructor
A new instance of All.
Methods included from ComparableInstance
Constructor Details
#initialize(matchers) ⇒ All
Returns a new instance of All.
10 11 12 13 14 |
# File 'lib/leftovers/matchers/all.rb', line 10 def initialize(matchers) @matchers = matchers freeze end |
Instance Attribute Details
#matchers ⇒ Object (readonly)
Returns the value of attribute matchers.
8 9 10 |
# File 'lib/leftovers/matchers/all.rb', line 8 def matchers @matchers end |
Instance Method Details
#===(value) ⇒ Object
16 17 18 19 20 |
# File 'lib/leftovers/matchers/all.rb', line 16 def ===(value) @matchers.all? do |matcher| matcher === value end end |