Class: Results
Overview
Results of searching files.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
Instance Method Summary collapse
- #add_match ⇒ Object
-
#initialize ⇒ Results
constructor
A new instance of Results.
- #matched? ⇒ Boolean
Constructor Details
#initialize ⇒ Results
Returns a new instance of Results.
12 13 14 |
# File 'lib/glark/output/results.rb', line 12 def initialize @count = 0 end |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
10 11 12 |
# File 'lib/glark/output/results.rb', line 10 def count @count end |
Instance Method Details
#add_match ⇒ Object
20 21 22 |
# File 'lib/glark/output/results.rb', line 20 def add_match @count += 1 end |
#matched? ⇒ Boolean
16 17 18 |
# File 'lib/glark/output/results.rb', line 16 def matched? @count > 0 end |