Class: Spellr::WordlistReporter

Inherits:
BaseReporter show all
Defined in:
lib/spellr/wordlist_reporter.rb

Instance Method Summary collapse

Methods inherited from BaseReporter

#counts, #exit_code, #increment, #initialize, #output, #print, #print_count, #print_value, #puts, #warn

Methods included from StringFormat

aqua, bold, green, key, lighten, normal, pluralize, red

Constructor Details

This class inherits a constructor from Spellr::BaseReporter

Instance Method Details

#call(token) ⇒ Object



12
13
14
# File 'lib/spellr/wordlist_reporter.rb', line 12

def call(token)
  words << token.spellr_normalize
end

#finishObject



8
9
10
# File 'lib/spellr/wordlist_reporter.rb', line 8

def finish
  puts words.sort.join unless words.empty?
end