Class: Attached::Processor::Base
- Inherits:
-
Object
- Object
- Attached::Processor::Base
- Defined in:
- lib/attached/processor/base.rb
Instance Attribute Summary collapse
-
#attachment ⇒ Object
Returns the value of attribute attachment.
-
#file ⇒ Object
Returns the value of attribute file.
-
#options ⇒ Object
Returns the value of attribute options.
Class Method Summary collapse
-
.process(file, options = {}, attachment = nil) ⇒ Object
Create and run a processor.
Instance Method Summary collapse
-
#initialize(file, options = {}, attachment = nil) ⇒ Base
constructor
Create a processor.
-
#process ⇒ Object
Run the processor.
Constructor Details
#initialize(file, options = {}, attachment = nil) ⇒ Base
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.
29 30 31 32 33 |
# File 'lib/attached/processor/base.rb', line 29 def initialize(file, = {}, = nil) @file = file @options = @attachment = end |
Instance Attribute Details
#attachment ⇒ Object
Returns the value of attribute attachment.
7 8 9 |
# File 'lib/attached/processor/base.rb', line 7 def @attachment end |
#file ⇒ Object
Returns the value of attribute file.
5 6 7 |
# File 'lib/attached/processor/base.rb', line 5 def file @file end |
#options ⇒ Object
Returns the value of attribute options.
6 7 8 |
# File 'lib/attached/processor/base.rb', line 6 def @options end |
Class Method Details
.process(file, options = {}, attachment = nil) ⇒ Object
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.
17 18 19 |
# File 'lib/attached/processor/base.rb', line 17 def self.process(file, = {}, = nil) new(file, , ).process end |
Instance Method Details
#process ⇒ Object
Run the processor.
37 38 39 |
# File 'lib/attached/processor/base.rb', line 37 def process raise NotImplementedError.new end |