Class: Mail::Logger::Configuration
- Inherits:
-
Object
- Object
- Mail::Logger::Configuration
- Defined in:
- lib/mail/logger/configuration.rb
Instance Attribute Summary collapse
-
#log_file_name ⇒ Object
Returns the value of attribute log_file_name.
-
#log_path ⇒ Object
Returns the value of attribute log_path.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #rails_log_file_name ⇒ Object
- #rails_log_path ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
4 5 6 7 |
# File 'lib/mail/logger/configuration.rb', line 4 def initialize self.log_path = rails_log_path || File.("./log") self.log_file_name = rails_log_file_name || "mail.log" end |
Instance Attribute Details
#log_file_name ⇒ Object
Returns the value of attribute log_file_name.
2 3 4 |
# File 'lib/mail/logger/configuration.rb', line 2 def log_file_name @log_file_name end |
#log_path ⇒ Object
Returns the value of attribute log_path.
2 3 4 |
# File 'lib/mail/logger/configuration.rb', line 2 def log_path @log_path end |
Instance Method Details
#rails_log_file_name ⇒ Object
15 16 17 18 19 |
# File 'lib/mail/logger/configuration.rb', line 15 def rails_log_file_name return nil unless defined? Rails "mail_#{Rails.env}.log" end |
#rails_log_path ⇒ Object
9 10 11 12 13 |
# File 'lib/mail/logger/configuration.rb', line 9 def rails_log_path return nil unless defined? Rails Rails.root.join("log") end |