Class: Reelagram::Mail::Processors::ShippingProcessor
- Inherits:
-
Object
- Object
- Reelagram::Mail::Processors::ShippingProcessor
- Defined in:
- lib/reelagram/mail/processors/shipping_processor.rb
Instance Attribute Summary collapse
-
#current_string ⇒ Object
readonly
Returns the value of attribute current_string.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#parser ⇒ Object
readonly
Returns the value of attribute parser.
-
#results ⇒ Object
readonly
Returns the value of attribute results.
Instance Method Summary collapse
-
#initialize(data, parser) ⇒ ShippingProcessor
constructor
A new instance of ShippingProcessor.
- #run ⇒ Object
Constructor Details
#initialize(data, parser) ⇒ ShippingProcessor
Returns a new instance of ShippingProcessor.
9 10 11 12 |
# File 'lib/reelagram/mail/processors/shipping_processor.rb', line 9 def initialize(data, parser) @data = [data].flatten @parser = parser end |
Instance Attribute Details
#current_string ⇒ Object (readonly)
Returns the value of attribute current_string.
6 7 8 |
# File 'lib/reelagram/mail/processors/shipping_processor.rb', line 6 def current_string @current_string end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
5 6 7 |
# File 'lib/reelagram/mail/processors/shipping_processor.rb', line 5 def data @data end |
#parser ⇒ Object (readonly)
Returns the value of attribute parser.
5 6 7 |
# File 'lib/reelagram/mail/processors/shipping_processor.rb', line 5 def parser @parser end |
#results ⇒ Object (readonly)
Returns the value of attribute results.
7 8 9 |
# File 'lib/reelagram/mail/processors/shipping_processor.rb', line 7 def results @results end |
Instance Method Details
#run ⇒ Object
14 15 16 |
# File 'lib/reelagram/mail/processors/shipping_processor.rb', line 14 def run data.map { |email| process_email(email[:body]) } end |