Class: ActivityNotification::Config
- Inherits:
-
Object
- Object
- ActivityNotification::Config
- Defined in:
- lib/activity_notification/config.rb
Overview
Class used to initialize configuration object.
Instance Attribute Summary collapse
- #email_enabled ⇒ Object
- #enabled ⇒ Object
- #mailer ⇒ Object
- #mailer_sender ⇒ Object
- #mailer_templates_dir ⇒ Object
- #notification_table_name ⇒ Object
- #opened_index_limit ⇒ Object
-
# ⇒ Boolean
Returns ORM name for ActivityNotification (:active_record or :mongoid).
- #parent_controller ⇒ Object
- #parent_mailer ⇒ Object
- #subscribe_as_default ⇒ Object
- #subscription_enabled ⇒ Object
- #subscription_table_name ⇒ Object
-
#table_name ⇒ Object
deprecated
Deprecated.
as of 1.1.0
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
Initialize configuration for ActivityNotification.
Constructor Details
#initialize ⇒ Config
Initialize configuration for ActivityNotification. These configuration can be overriden in initializer.
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/activity_notification/config.rb', line 130 def initialize @enabled = true @notification_table_name = 'notifications' @subscription_table_name = 'subscriptions' @email_enabled = false @subscription_enabled = false @subscribe_as_default = true @mailer_sender = nil @mailer = 'ActivityNotification::Mailer' @parent_mailer = 'ActionMailer::Base' @parent_controller = 'ApplicationController' @mailer_templates_dir = 'activity_notification/mailer' @opened_index_limit = 10 @orm = :active_record end |
Instance Attribute Details
#email_enabled ⇒ Boolean #email_enabled=(value) ⇒ Boolean
48 49 50 |
# File 'lib/activity_notification/config.rb', line 48 def email_enabled @email_enabled end |
#enabled ⇒ Boolean #enabled=(value) ⇒ Boolean
11 12 13 |
# File 'lib/activity_notification/config.rb', line 11 def enabled @enabled end |
#mailer ⇒ String #mailer=(value) ⇒ String
84 85 86 |
# File 'lib/activity_notification/config.rb', line 84 def mailer @mailer end |
#mailer_sender ⇒ String #mailer_sender=(value) ⇒ String
75 76 77 |
# File 'lib/activity_notification/config.rb', line 75 def mailer_sender @mailer_sender end |
#mailer_templates_dir ⇒ String #mailer_templates_dir=(value) ⇒ String
111 112 113 |
# File 'lib/activity_notification/config.rb', line 111 def mailer_templates_dir @mailer_templates_dir end |
#notification_table_name ⇒ String #notification_table_name=(value) ⇒ String
30 31 32 |
# File 'lib/activity_notification/config.rb', line 30 def notification_table_name @notification_table_name end |
#opened_index_limit ⇒ Integer #opened_index_limit=(value) ⇒ Integer
120 121 122 |
# File 'lib/activity_notification/config.rb', line 120 def opened_index_limit @opened_index_limit end |
# ⇒ Boolean
125 126 127 |
# File 'lib/activity_notification/config.rb', line 125 def orm @orm end |
#parent_controller ⇒ String #parent_controller=(value) ⇒ String
102 103 104 |
# File 'lib/activity_notification/config.rb', line 102 def parent_controller @parent_controller end |
#parent_mailer ⇒ String #parent_mailer=(value) ⇒ String
93 94 95 |
# File 'lib/activity_notification/config.rb', line 93 def parent_mailer @parent_mailer end |
#subscribe_as_default ⇒ Boolean #default_subscription=(value) ⇒ Boolean
66 67 68 |
# File 'lib/activity_notification/config.rb', line 66 def subscribe_as_default @subscribe_as_default end |
#subscription_enabled ⇒ Boolean #subscription_enabled=(value) ⇒ Boolean
57 58 59 |
# File 'lib/activity_notification/config.rb', line 57 def subscription_enabled @subscription_enabled end |