Class: Attached::Processor::Base
- Inherits:
-
Object
- Object
- Attached::Processor::Base
- Defined in:
- lib/attached/processor/base.rb
Instance Attribute Summary (collapse)
-
- (Object) attachment
Returns the value of attribute attachment.
-
- (Object) file
Returns the value of attribute file.
-
- (Object) options
Returns the value of attribute options.
Class Method Summary (collapse)
-
+ (Object) process(file, options = {}, attachment = nil)
Create and run a processor.
Instance Method Summary (collapse)
-
- (Base) initialize(file, options = {}, attachment = nil)
constructor
Create a processor.
-
- (Object) process
Run the processor.
Constructor Details
- (Base) initialize(file, options = {}, attachment = nil)
Create a processor.
Parameters:
-
file - The file to be processed.
-
options - The options to be applied to the processing.
-
attachment - The attachment the processor is being run for.
32 33 34 35 36 |
# File 'lib/attached/processor/base.rb', line 32 def initialize(file, = {}, = nil) @file = file @options = @attachment = end |
Instance Attribute Details
- (Object) attachment
Returns the value of attribute attachment
8 9 10 |
# File 'lib/attached/processor/base.rb', line 8 def @attachment end |
- (Object) file
Returns the value of attribute file
6 7 8 |
# File 'lib/attached/processor/base.rb', line 6 def file @file end |
- (Object) options
Returns the value of attribute options
7 8 9 |
# File 'lib/attached/processor/base.rb', line 7 def @options end |
Class Method Details
+ (Object) process(file, options = {}, attachment = nil)
Create and run a processor.
Parameters:
-
file - The file to be processed.
-
options - The options to be applied to the processing.
-
attachment - The attachment the processor is being run for.
19 20 21 |
# File 'lib/attached/processor/base.rb', line 19 def self.process(file, = {}, = nil) new(file, , ).process end |
Instance Method Details
- (Object) process
Run the processor.
41 42 43 |
# File 'lib/attached/processor/base.rb', line 41 def process raise NotImplementedError.new end |