Class: All
- Inherits:
-
Object
- Object
- All
- Defined in:
- lib/itesttool/custom_matchers.rb
Instance Method Summary collapse
- #failure_message_for_should ⇒ Object
-
#initialize(matcher) ⇒ All
constructor
A new instance of All.
- #matches?(rows) ⇒ Boolean
Constructor Details
#initialize(matcher) ⇒ All
Returns a new instance of All.
92 93 94 |
# File 'lib/itesttool/custom_matchers.rb', line 92 def initialize(matcher) @matcher = matcher end |
Instance Method Details
#failure_message_for_should ⇒ Object
106 107 108 |
# File 'lib/itesttool/custom_matchers.rb', line 106 def "at[#{@elem}] #{@matcher.}" end |
#matches?(rows) ⇒ Boolean
96 97 98 99 100 101 102 103 104 |
# File 'lib/itesttool/custom_matchers.rb', line 96 def matches?(rows) rows.each_with_index do |i, j| @elem = j unless @matcher.matches? i return false end end return true end |