Class: SimpleInvoice::Emailer::MailConfig
- Inherits:
-
Object
- Object
- SimpleInvoice::Emailer::MailConfig
- Extended by:
- Forwardable
- Defined in:
- lib/simple_invoice/emailer/mail_config.rb
Class Method Summary collapse
- .email_from(email) ⇒ Object
- .email_subject(subject) ⇒ Object
- .instance ⇒ Object
- .organisation_name(name) ⇒ Object
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object
-
#initialize ⇒ MailConfig
constructor
A new instance of MailConfig.
Constructor Details
#initialize ⇒ MailConfig
Returns a new instance of MailConfig.
31 32 33 |
# File 'lib/simple_invoice/emailer/mail_config.rb', line 31 def initialize @config_hash = {} end |
Class Method Details
.email_from(email) ⇒ Object
15 16 17 |
# File 'lib/simple_invoice/emailer/mail_config.rb', line 15 def email_from email instance[:email_from] = email end |
.email_subject(subject) ⇒ Object
20 21 22 |
# File 'lib/simple_invoice/emailer/mail_config.rb', line 20 def email_subject subject instance[:email_subject] = subject end |
.instance ⇒ Object
10 11 12 |
# File 'lib/simple_invoice/emailer/mail_config.rb', line 10 def instance @instance ||= new end |
.organisation_name(name) ⇒ Object
25 26 27 |
# File 'lib/simple_invoice/emailer/mail_config.rb', line 25 def organisation_name name instance[:organisation_name] = name end |
Instance Method Details
#[](key) ⇒ Object
35 36 37 |
# File 'lib/simple_invoice/emailer/mail_config.rb', line 35 def [](key) @config_hash[key] end |
#[]=(key, value) ⇒ Object
39 40 41 |
# File 'lib/simple_invoice/emailer/mail_config.rb', line 39 def []=(key, value) @config_hash[key] = value end |