Class: Results
- Inherits:
-
Object
- Object
- Results
- Defined in:
- lib/glark/output/results.rb
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.
10 11 12 |
# File 'lib/glark/output/results.rb', line 10 def initialize @count = 0 end |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
8 9 10 |
# File 'lib/glark/output/results.rb', line 8 def count @count end |
Instance Method Details
#add_match ⇒ Object
18 19 20 |
# File 'lib/glark/output/results.rb', line 18 def add_match @count += 1 end |
#matched? ⇒ Boolean
14 15 16 |
# File 'lib/glark/output/results.rb', line 14 def matched? @count > 0 end |