Class: PostDB::Mail
- Inherits:
-
Object
- Object
- PostDB::Mail
- Defined in:
- lib/postdb/mail.rb
Class Attribute Summary collapse
-
.mail_location ⇒ Object
readonly
The template path to the mail location.
Class Method Summary collapse
-
.setup_with_configuration! ⇒ Object
Setup the mail configuration.
Class Attribute Details
.mail_location ⇒ Object (readonly)
The template path to the mail location
6 7 8 |
# File 'lib/postdb/mail.rb', line 6 def mail_location @mail_location end |
Class Method Details
.setup_with_configuration! ⇒ Object
Setup the mail configuration
Example:
>> PostDB::Mail.setup_with_configuration!
=> nil
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/postdb/mail.rb', line 14 def setup_with_configuration! configuration = PostDB::Configuration[:mail] unless configuration.is_a?(Hash) raise PostDB::SetupError.new(:missing_mail_args) end unless configuration[:location] raise PostDB::SetupError.new(:missing_mail_location) end @mail_location = PostDB::MailLocation.new(configuration[:location]) nil end |