Class: Wordlist::Modifiers::Capitalize
- Defined in:
- lib/wordlist/modifiers/capitalize.rb
Overview
Lazily calls String#capitalize
on every word in the wordlist.
Instance Attribute Summary
Attributes inherited from Modifier
Instance Method Summary collapse
-
#each {|word| ... } ⇒ Enumerator
Enumerates over every capitalized word in the wordlist.
Methods inherited from Modifier
Constructor Details
This class inherits a constructor from Wordlist::Modifiers::Modifier
Instance Method Details
#each {|word| ... } ⇒ Enumerator
Enumerates over every capitalized word in the wordlist.
36 37 38 39 40 41 42 |
# File 'lib/wordlist/modifiers/capitalize.rb', line 36 def each return enum_for(__method__) unless block_given? @wordlist.each do |word| yield word.capitalize end end |