Class: Griddler::Configuration
- Inherits:
-
Object
- Object
- Griddler::Configuration
- Defined in:
- lib/griddler/configuration.rb
Instance Attribute Summary collapse
-
#cc ⇒ Object
Returns the value of attribute cc.
-
#from ⇒ Object
Returns the value of attribute from.
-
#processor_class ⇒ Object
Returns the value of attribute processor_class.
-
#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
- #to ⇒ Object
- #to=(type) ⇒ Object
Instance Attribute Details
#cc ⇒ Object
Returns the value of attribute cc.
19 20 21 |
# File 'lib/griddler/configuration.rb', line 19 def cc @cc end |
#from ⇒ Object
Returns the value of attribute from.
19 20 21 |
# File 'lib/griddler/configuration.rb', line 19 def from @from end |
#processor_class ⇒ Object
Returns the value of attribute processor_class.
19 20 21 |
# File 'lib/griddler/configuration.rb', line 19 def processor_class @processor_class end |
#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
56 57 58 |
# File 'lib/griddler/configuration.rb', line 56 def email_service @email_service_adapter ||= adapter_class[:sendgrid] end |
#email_service=(new_email_service) ⇒ Object
60 61 62 63 64 65 66 |
# File 'lib/griddler/configuration.rb', line 60 def email_service=(new_email_service) if new_email_service == :default new_email_service = :sendgrid end @email_service_adapter = adapter_class.fetch(new_email_service) { raise Griddler::Errors::EmailServiceAdapterNotFound } end |
#to ⇒ Object
21 22 23 |
# File 'lib/griddler/configuration.rb', line 21 def to @to ||= :hash end |
#to=(type) ⇒ Object
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/griddler/configuration.rb', line 25 def to=(type) if type == :token Kernel.warn <<-WARN.strip_heredoc [Deprecation] the :token option is deprecated and will be removed in v0.6. For tokens use :hash and retrieve the token from email.to[:token] or choose any of [:email, :full, :hash] WARN end @to = type end |