Class: Griddler::Configuration
- Inherits:
-
Object
- Object
- Griddler::Configuration
- Defined in:
- lib/griddler/configuration.rb
Instance Attribute Summary collapse
-
#processor_method ⇒ Object
Returns the value of attribute processor_method.
-
#reply_delimiter ⇒ Object
Returns the value of attribute reply_delimiter.
Instance Method Summary collapse
- #email_service ⇒ Object
- #email_service=(new_email_service) ⇒ Object
- #processor_class ⇒ Object
- #processor_class=(klass) ⇒ Object
Instance Attribute Details
#processor_method ⇒ Object
Returns the value of attribute processor_method.
19 20 21 |
# File 'lib/griddler/configuration.rb', line 19 def processor_method @processor_method end |
#reply_delimiter ⇒ Object
Returns the value of attribute reply_delimiter.
19 20 21 |
# File 'lib/griddler/configuration.rb', line 19 def reply_delimiter @reply_delimiter end |
Instance Method Details
#email_service ⇒ Object
47 48 49 50 51 |
# File 'lib/griddler/configuration.rb', line 47 def email_service @email_service_adapter ||= Griddler.adapter_registry[:default] || raise(Griddler::Errors::EmailServiceAdapterNotFound) end |
#email_service=(new_email_service) ⇒ Object
53 54 55 |
# File 'lib/griddler/configuration.rb', line 53 def email_service=(new_email_service) @email_service_adapter = Griddler.adapter_registry.fetch(new_email_service) { raise Griddler::Errors::EmailServiceAdapterNotFound } end |
#processor_class ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/griddler/configuration.rb', line 21 def processor_class @processor_class ||= begin EmailProcessor.to_s rescue NameError raise NameError.new(" To use Griddler, you must either define `EmailProcessor` or configure a\n different processor. See https://github.com/thoughtbot/griddler#defaults for\n more information.\n ERROR\n end\n @processor_class.constantize\nend\n".strip_heredoc, 'EmailProcessor') |
#processor_class=(klass) ⇒ Object
35 36 37 |
# File 'lib/griddler/configuration.rb', line 35 def processor_class=(klass) @processor_class = klass.to_s end |