Class: RailsMail::Configuration
- Inherits:
-
Object
- Object
- RailsMail::Configuration
- Defined in:
- lib/rails_mail/configuration.rb
Instance Attribute Summary collapse
-
#authentication_callback ⇒ Object
Returns the value of attribute authentication_callback.
-
#enqueue_trim_job ⇒ Object
Returns the value of attribute enqueue_trim_job.
-
#per_page ⇒ Object
Returns the value of attribute per_page.
-
#show_clear_all_button_callback ⇒ Object
Returns the value of attribute show_clear_all_button_callback.
-
#trim_emails_max_count ⇒ Object
Returns the value of attribute trim_emails_max_count.
-
#trim_emails_older_than ⇒ Object
Returns the value of attribute trim_emails_older_than.
Instance Method Summary collapse
- #authenticate(&callback) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #show_clear_all_button(&callback) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
9 10 11 12 13 14 15 16 17 |
# File 'lib/rails_mail/configuration.rb', line 9 def initialize @authentication_callback = nil @show_clear_all_button_callback = nil @trim_emails_older_than = nil @trim_emails_max_count = nil @enqueue_trim_job = ->(email) { RailsMail::TrimEmailsJob.perform_later } @per_page = nil register_default_renderers end |
Instance Attribute Details
#authentication_callback ⇒ Object
Returns the value of attribute authentication_callback.
5 6 7 |
# File 'lib/rails_mail/configuration.rb', line 5 def authentication_callback @authentication_callback end |
#enqueue_trim_job ⇒ Object
Returns the value of attribute enqueue_trim_job.
5 6 7 |
# File 'lib/rails_mail/configuration.rb', line 5 def enqueue_trim_job @enqueue_trim_job end |
#per_page ⇒ Object
Returns the value of attribute per_page.
5 6 7 |
# File 'lib/rails_mail/configuration.rb', line 5 def per_page @per_page end |
#show_clear_all_button_callback ⇒ Object
Returns the value of attribute show_clear_all_button_callback.
5 6 7 |
# File 'lib/rails_mail/configuration.rb', line 5 def @show_clear_all_button_callback end |
#trim_emails_max_count ⇒ Object
Returns the value of attribute trim_emails_max_count.
5 6 7 |
# File 'lib/rails_mail/configuration.rb', line 5 def trim_emails_max_count @trim_emails_max_count end |
#trim_emails_older_than ⇒ Object
Returns the value of attribute trim_emails_older_than.
5 6 7 |
# File 'lib/rails_mail/configuration.rb', line 5 def trim_emails_older_than @trim_emails_older_than end |
Instance Method Details
#authenticate(&callback) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/rails_mail/configuration.rb', line 19 def authenticate(&callback) unless callback.nil? || callback.respond_to?(:call) raise ArgumentError, "authentication_callback must be nil or respond to #call" end @authentication_callback = callback end |
#show_clear_all_button(&callback) ⇒ Object
26 27 28 29 30 31 |
# File 'lib/rails_mail/configuration.rb', line 26 def (&callback) unless callback.nil? || callback.respond_to?(:call) raise ArgumentError, "show_clear_all_button must be nil or respond to #call" end @show_clear_all_button_callback = callback end |