Class: WebMole::OutputFormatter
- Inherits:
-
Object
- Object
- WebMole::OutputFormatter
- Defined in:
- lib/webmole/output_formatter.rb
Instance Method Summary collapse
- #format_results(matches) ⇒ Object
-
#initialize(format = nil, output = nil, save_source_url = false) ⇒ OutputFormatter
constructor
A new instance of OutputFormatter.
Constructor Details
#initialize(format = nil, output = nil, save_source_url = false) ⇒ OutputFormatter
Returns a new instance of OutputFormatter.
6 7 8 9 10 |
# File 'lib/webmole/output_formatter.rb', line 6 def initialize(format = nil, output = nil, save_source_url = false) @format = format @output = output @save_source_url = save_source_url end |
Instance Method Details
#format_results(matches) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/webmole/output_formatter.rb', line 12 def format_results(matches) if @output save_results(matches) else print_results(matches) end end |