Class: MailEnvi::Config
- Inherits:
-
Object
- Object
- MailEnvi::Config
- Defined in:
- lib/mail_envi/config.rb
Instance Attribute Summary collapse
-
#default_to ⇒ Object
Returns the value of attribute default_to.
-
#environments ⇒ Object
Returns the value of attribute environments.
-
#interceptor ⇒ Object
Returns the value of attribute interceptor.
Instance Method Summary collapse
- #include_environments(envs = []) ⇒ Object
-
#initialize(&block) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(&block) ⇒ Config
Returns a new instance of Config.
3 4 5 6 7 |
# File 'lib/mail_envi/config.rb', line 3 def initialize &block @environments = ['development', 'test'] instance_eval(&block) if block_given? end |
Instance Attribute Details
#default_to ⇒ Object
Returns the value of attribute default_to.
9 10 11 |
# File 'lib/mail_envi/config.rb', line 9 def default_to @default_to end |
#environments ⇒ Object
Returns the value of attribute environments.
9 10 11 |
# File 'lib/mail_envi/config.rb', line 9 def environments @environments end |
#interceptor ⇒ Object
Returns the value of attribute interceptor.
9 10 11 |
# File 'lib/mail_envi/config.rb', line 9 def interceptor @interceptor end |
Instance Method Details
#include_environments(envs = []) ⇒ Object
15 16 17 |
# File 'lib/mail_envi/config.rb', line 15 def include_environments(envs = []) @environments+= envs.map(&:to_s) if envs && envs.any? end |