Class: ExpressMailer::Configuration
- Inherits:
-
Object
- Object
- ExpressMailer::Configuration
- Defined in:
- lib/express_mailer/configuration.rb
Instance Attribute Summary collapse
-
#app_logo ⇒ Object
Returns the value of attribute app_logo.
-
#app_name ⇒ Object
Returns the value of attribute app_name.
-
#app_url ⇒ Object
Returns the value of attribute app_url.
-
#background_color ⇒ Object
Returns the value of attribute background_color.
-
#border_color ⇒ Object
Returns the value of attribute border_color.
-
#default_footer ⇒ Object
Returns the value of attribute default_footer.
-
#default_from ⇒ Object
Returns the value of attribute default_from.
-
#default_to ⇒ Object
Returns the value of attribute default_to.
-
#error_button_background_color ⇒ Object
Returns the value of attribute error_button_background_color.
-
#error_button_text_color ⇒ Object
Returns the value of attribute error_button_text_color.
-
#error_text_color ⇒ Object
Returns the value of attribute error_text_color.
-
#headline_font_family ⇒ Object
Returns the value of attribute headline_font_family.
-
#info_button_background_color ⇒ Object
Returns the value of attribute info_button_background_color.
-
#info_button_text_color ⇒ Object
Returns the value of attribute info_button_text_color.
-
#info_text_color ⇒ Object
Returns the value of attribute info_text_color.
-
#subject_prefix ⇒ Object
Returns the value of attribute subject_prefix.
-
#success_button_background_color ⇒ Object
Returns the value of attribute success_button_background_color.
-
#success_button_text_color ⇒ Object
Returns the value of attribute success_button_text_color.
-
#success_text_color ⇒ Object
Returns the value of attribute success_text_color.
-
#text_color ⇒ Object
Returns the value of attribute text_color.
-
#text_font_family ⇒ Object
Returns the value of attribute text_font_family.
-
#warning_button_background_color ⇒ Object
Returns the value of attribute warning_button_background_color.
-
#warning_button_text_color ⇒ Object
Returns the value of attribute warning_button_text_color.
-
#warning_text_color ⇒ Object
Returns the value of attribute warning_text_color.
-
#webfont_url ⇒ Object
Returns the value of attribute webfont_url.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(options = {}) ⇒ Configuration
Returns a new instance of Configuration.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/express_mailer/configuration.rb', line 12 def initialize( = {}) @default_to = .fetch(:default_to, nil) @default_from = .fetch(:default_from, '[email protected]') @default_footer = .fetch(:default_footer, nil) @subject_prefix = .fetch(:subject_prefix, nil) @app_name = .fetch(:app_name, 'Example Company') @app_logo = .fetch(:app_logo, nil) @app_url = .fetch(:app_url, 'http://example.com') @background_color = .fetch(:background_color, '#212E3C') @text_color = .fetch(:text_color, '#FFF') @border_color = .fetch(:border_color, '#5E637A') @webfont_url = .fetch(:webfont_url, 'https://fonts.googleapis.com/css?family=Dosis:600|Lato:400,400i,700,700i') @headline_font_family = .fetch(:headline_font_family, "Dosis, 'Helvetica Neue', 'Arial', 'sans-serif'") @text_font_family = .fetch(:text_font_family, "Lato, 'Helvetica Neue', 'Arial', 'sans-serif'") @info_text_color = .fetch(:info_text_color, '#AC8DF7') @info_button_text_color = .fetch(:info_button_text_color, @background_color) @info_button_background_color = .fetch(:info_button_text_color, @info_text_color) @success_text_color = .fetch(:success_text_color, '#02D6A1') @success_button_text_color = .fetch(:success_button_text_color, @background_color) @success_button_background_color = .fetch(:success_button_text_color, @success_text_color) @warning_text_color = .fetch(:warning_text_color, '#FFD166') @warning_button_text_color = .fetch(:warning_button_text_color, @background_color) @warning_button_background_color = .fetch(:warning_button_text_color, @warning_text_color) @error_text_color = .fetch(:error_text_color, '#EF476F') @error_button_text_color = .fetch(:error_button_text_color, @background_color) @error_button_background_color = .fetch(:error_button_text_color, @error_text_color) end |
Instance Attribute Details
#app_logo ⇒ Object
Returns the value of attribute app_logo.
3 4 5 |
# File 'lib/express_mailer/configuration.rb', line 3 def app_logo @app_logo end |
#app_name ⇒ Object
Returns the value of attribute app_name.
3 4 5 |
# File 'lib/express_mailer/configuration.rb', line 3 def app_name @app_name end |
#app_url ⇒ Object
Returns the value of attribute app_url.
3 4 5 |
# File 'lib/express_mailer/configuration.rb', line 3 def app_url @app_url end |
#background_color ⇒ Object
Returns the value of attribute background_color.
3 4 5 |
# File 'lib/express_mailer/configuration.rb', line 3 def background_color @background_color end |
#border_color ⇒ Object
Returns the value of attribute border_color.
3 4 5 |
# File 'lib/express_mailer/configuration.rb', line 3 def border_color @border_color end |
#default_footer ⇒ Object
Returns the value of attribute default_footer.
3 4 5 |
# File 'lib/express_mailer/configuration.rb', line 3 def @default_footer end |
#default_from ⇒ Object
Returns the value of attribute default_from.
3 4 5 |
# File 'lib/express_mailer/configuration.rb', line 3 def default_from @default_from end |
#default_to ⇒ Object
Returns the value of attribute default_to.
3 4 5 |
# File 'lib/express_mailer/configuration.rb', line 3 def default_to @default_to end |
#error_button_background_color ⇒ Object
Returns the value of attribute error_button_background_color.
3 4 5 |
# File 'lib/express_mailer/configuration.rb', line 3 def @error_button_background_color end |
#error_button_text_color ⇒ Object
Returns the value of attribute error_button_text_color.
3 4 5 |
# File 'lib/express_mailer/configuration.rb', line 3 def @error_button_text_color end |
#error_text_color ⇒ Object
Returns the value of attribute error_text_color.
3 4 5 |
# File 'lib/express_mailer/configuration.rb', line 3 def error_text_color @error_text_color end |
#headline_font_family ⇒ Object
Returns the value of attribute headline_font_family.
3 4 5 |
# File 'lib/express_mailer/configuration.rb', line 3 def headline_font_family @headline_font_family end |
#info_button_background_color ⇒ Object
Returns the value of attribute info_button_background_color.
3 4 5 |
# File 'lib/express_mailer/configuration.rb', line 3 def @info_button_background_color end |
#info_button_text_color ⇒ Object
Returns the value of attribute info_button_text_color.
3 4 5 |
# File 'lib/express_mailer/configuration.rb', line 3 def @info_button_text_color end |
#info_text_color ⇒ Object
Returns the value of attribute info_text_color.
3 4 5 |
# File 'lib/express_mailer/configuration.rb', line 3 def info_text_color @info_text_color end |
#subject_prefix ⇒ Object
Returns the value of attribute subject_prefix.
3 4 5 |
# File 'lib/express_mailer/configuration.rb', line 3 def subject_prefix @subject_prefix end |
#success_button_background_color ⇒ Object
Returns the value of attribute success_button_background_color.
3 4 5 |
# File 'lib/express_mailer/configuration.rb', line 3 def @success_button_background_color end |
#success_button_text_color ⇒ Object
Returns the value of attribute success_button_text_color.
3 4 5 |
# File 'lib/express_mailer/configuration.rb', line 3 def @success_button_text_color end |
#success_text_color ⇒ Object
Returns the value of attribute success_text_color.
3 4 5 |
# File 'lib/express_mailer/configuration.rb', line 3 def success_text_color @success_text_color end |
#text_color ⇒ Object
Returns the value of attribute text_color.
3 4 5 |
# File 'lib/express_mailer/configuration.rb', line 3 def text_color @text_color end |
#text_font_family ⇒ Object
Returns the value of attribute text_font_family.
3 4 5 |
# File 'lib/express_mailer/configuration.rb', line 3 def text_font_family @text_font_family end |
#warning_button_background_color ⇒ Object
Returns the value of attribute warning_button_background_color.
3 4 5 |
# File 'lib/express_mailer/configuration.rb', line 3 def @warning_button_background_color end |
#warning_button_text_color ⇒ Object
Returns the value of attribute warning_button_text_color.
3 4 5 |
# File 'lib/express_mailer/configuration.rb', line 3 def @warning_button_text_color end |
#warning_text_color ⇒ Object
Returns the value of attribute warning_text_color.
3 4 5 |
# File 'lib/express_mailer/configuration.rb', line 3 def warning_text_color @warning_text_color end |
#webfont_url ⇒ Object
Returns the value of attribute webfont_url.
3 4 5 |
# File 'lib/express_mailer/configuration.rb', line 3 def webfont_url @webfont_url end |