Class: Text::Gen::Filter::Upcase
- Defined in:
- lib/text/gen/filter/upcase.rb
Instance Method Summary collapse
Methods inherited from Base
#component_key, filter_key, filter_name, #initialize, #key, #to_s, #type, #value
Constructor Details
This class inherits a constructor from Text::Gen::Filter::Base
Instance Method Details
#result(context, result) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/text/gen/filter/upcase.rb', line 7 def result(context, result) return result if @depth && context.depth != @depth text = result.text text = text.upcase return result if text == result.text Result.from(result, text:, type: component_key) end |