Class: CSVConverter::Converters::UppercaseConverter
- Inherits:
-
BaseConverter
- Object
- BaseConverter
- CSVConverter::Converters::UppercaseConverter
- Defined in:
- lib/csv_converter/converters/uppercase_converter.rb
Overview
Converts a string to uppercase
Instance Attribute Summary
Attributes inherited from BaseConverter
Instance Method Summary collapse
-
#call ⇒ String
Converts a string to uppercase.
-
#call! ⇒ String
Converts a string to uppercase.
Methods inherited from BaseConverter
#data, #empty_value?, #initialize
Constructor Details
This class inherits a constructor from CSVConverter::Converters::BaseConverter
Instance Method Details
#call ⇒ String
Converts a string to uppercase
9 10 11 12 13 |
# File 'lib/csv_converter/converters/uppercase_converter.rb', line 9 def call call! rescue CSVConverter::Error nullable_object end |
#call! ⇒ String
Converts a string to uppercase
17 18 19 20 21 22 23 |
# File 'lib/csv_converter/converters/uppercase_converter.rb', line 17 def call! raise ArgumentError, 'no data provided' if data.blank? data.upcase rescue StandardError => e raise CSVConverter::Error.new(e., ) end |