Class: LittleWeasel::Preprocessors::EnUs::CapitalizePreprocessor

Inherits:
WordPreprocessor
  • Object
show all
Defined in:
lib/LittleWeasel/preprocessors/en_us/capitalize_preprocessor.rb

Overview

This preprocessor capitializes a word.

Instance Attribute Summary

Attributes inherited from WordPreprocessor

#preprocessor_on

Attributes included from Modules::Orderable

#order

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from WordPreprocessor

#preprocess, #preprocess?, preprocess?, #preprocessed_word, #preprocessor_off!, #preprocessor_off?, #preprocessor_on!, #preprocessor_on?

Methods included from Modules::OrderValidatable

#validate_order, validate_order

Methods included from Modules::ClassNameToSymbol

included, #to_sym

Constructor Details

#initialize(order: 0) ⇒ CapitalizePreprocessor

Returns a new instance of CapitalizePreprocessor.



10
11
12
# File 'lib/LittleWeasel/preprocessors/en_us/capitalize_preprocessor.rb', line 10

def initialize(order: 0)
  super
end

Class Method Details

.preprocess(word) ⇒ Object



15
16
17
# File 'lib/LittleWeasel/preprocessors/en_us/capitalize_preprocessor.rb', line 15

def preprocess(word)
  [true, word.capitalize]
end