Class: BusinessCatalyst::CSV::Transformer
- Inherits:
-
Object
- Object
- BusinessCatalyst::CSV::Transformer
- Defined in:
- lib/business_catalyst/csv/transformers/transformer.rb
Direct Known Subclasses
ArrayTransformer, BooleanTransformer, CatalogTransformer, CurrencyTransformer, GenericTransformer, ProductAttributesTransformer, ProductCodeTransformer, SEOFriendlyUrlTransformer, TemplateIDTransformer, URIArrayTransformer, URITransformer
Instance Attribute Summary collapse
-
#input ⇒ Object
Returns the value of attribute input.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(input) ⇒ Transformer
constructor
A new instance of Transformer.
- #transform ⇒ Object
Constructor Details
#initialize(input) ⇒ Transformer
Returns a new instance of Transformer.
8 9 10 |
# File 'lib/business_catalyst/csv/transformers/transformer.rb', line 8 def initialize(input) @input = input end |
Instance Attribute Details
#input ⇒ Object
Returns the value of attribute input.
6 7 8 |
# File 'lib/business_catalyst/csv/transformers/transformer.rb', line 6 def input @input end |
Class Method Details
.transform(input) ⇒ Object
16 17 18 |
# File 'lib/business_catalyst/csv/transformers/transformer.rb', line 16 def self.transform(input) self.new(input).transform end |
Instance Method Details
#transform ⇒ Object
12 13 14 |
# File 'lib/business_catalyst/csv/transformers/transformer.rb', line 12 def transform raise NotImplementedError, "Transformer subclasses must implement #transform" end |