Class: BusinessCatalyst::CSV::ProductCodeTransformer
- Inherits:
-
Transformer
- Object
- Transformer
- BusinessCatalyst::CSV::ProductCodeTransformer
- Defined in:
- lib/business_catalyst/csv/transformers/product_code_transformer.rb
Instance Attribute Summary
Attributes inherited from Transformer
Instance Method Summary collapse
-
#initialize(input) ⇒ ProductCodeTransformer
constructor
A new instance of ProductCodeTransformer.
- #transform ⇒ Object
Methods inherited from Transformer
Constructor Details
#initialize(input) ⇒ ProductCodeTransformer
Returns a new instance of ProductCodeTransformer.
7 8 9 10 11 12 |
# File 'lib/business_catalyst/csv/transformers/product_code_transformer.rb', line 7 def initialize(input) if input.blank? raise InvalidInputError, "product_code must not be blank" end super(input) end |
Instance Method Details
#transform ⇒ Object
14 15 16 |
# File 'lib/business_catalyst/csv/transformers/product_code_transformer.rb', line 14 def transform input.to_s end |