Class: Results

Inherits:
Object
  • Object
show all
Includes:
Loggable
Defined in:
lib/glark/output/results.rb

Overview

Results of searching files.

Direct Known Subclasses

Formatted

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeResults

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

#countObject (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_matchObject



20
21
22
# File 'lib/glark/output/results.rb', line 20

def add_match
  @count += 1
end

#matched?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/glark/output/results.rb', line 16

def matched?
  @count > 0
end