Class: Dreamcatcher::Configuration
- Inherits:
-
Object
- Object
- Dreamcatcher::Configuration
- Defined in:
- lib/dreamcatcher/configuration.rb
Instance Attribute Summary collapse
-
#deliver ⇒ Object
Returns the value of attribute deliver.
-
#exception_class ⇒ Object
Returns the value of attribute exception_class.
-
#from ⇒ Object
Returns the value of attribute from.
-
#subject ⇒ Object
Returns the value of attribute subject.
-
#template ⇒ Object
Returns the value of attribute template.
-
#template_dir ⇒ Object
Returns the value of attribute template_dir.
-
#to ⇒ Object
Returns the value of attribute to.
-
#via ⇒ Object
Returns the value of attribute via.
-
#via_options ⇒ Object
Returns the value of attribute via_options.
Instance Method Summary collapse
- #evaluate(symbol, *args) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/dreamcatcher/configuration.rb', line 8 def initialize @exception_class = StandardError @from = '[email protected]' @subject = lambda do |context| "Exception #{context.exception.class.name}: #{context.exception.}" end @template_dir = Dreamcatcher::TEMPLATE_DIR @template = 'generic_exception' @via = :sendmail @via_options = nil @deliver = false end |
Instance Attribute Details
#deliver ⇒ Object
Returns the value of attribute deliver.
3 4 5 |
# File 'lib/dreamcatcher/configuration.rb', line 3 def deliver @deliver end |
#exception_class ⇒ Object
Returns the value of attribute exception_class.
3 4 5 |
# File 'lib/dreamcatcher/configuration.rb', line 3 def exception_class @exception_class end |
#from ⇒ Object
Returns the value of attribute from.
3 4 5 |
# File 'lib/dreamcatcher/configuration.rb', line 3 def from @from end |
#subject ⇒ Object
Returns the value of attribute subject.
3 4 5 |
# File 'lib/dreamcatcher/configuration.rb', line 3 def subject @subject end |
#template ⇒ Object
Returns the value of attribute template.
3 4 5 |
# File 'lib/dreamcatcher/configuration.rb', line 3 def template @template end |
#template_dir ⇒ Object
Returns the value of attribute template_dir.
3 4 5 |
# File 'lib/dreamcatcher/configuration.rb', line 3 def template_dir @template_dir end |
#to ⇒ Object
Returns the value of attribute to.
3 4 5 |
# File 'lib/dreamcatcher/configuration.rb', line 3 def to @to end |
#via ⇒ Object
Returns the value of attribute via.
3 4 5 |
# File 'lib/dreamcatcher/configuration.rb', line 3 def via @via end |
#via_options ⇒ Object
Returns the value of attribute via_options.
3 4 5 |
# File 'lib/dreamcatcher/configuration.rb', line 3 def @via_options end |
Instance Method Details
#evaluate(symbol, *args) ⇒ Object
23 24 25 26 |
# File 'lib/dreamcatcher/configuration.rb', line 23 def evaluate(symbol, *args) value = self.send(symbol) value.respond_to?(:call) ? value.call(*args) : value end |