Class: ValidationErrorReporter::Configuration
- Inherits:
-
Object
- Object
- ValidationErrorReporter::Configuration
- Defined in:
- lib/validation_error_reporter/configuration.rb
Instance Attribute Summary collapse
-
#from ⇒ Object
Returns the value of attribute from.
-
#notifiers ⇒ Object
Returns the value of attribute notifiers.
-
#profiler ⇒ Object
Returns the value of attribute profiler.
-
#to ⇒ Object
Returns the value of attribute to.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(options = {}) ⇒ Configuration
Returns a new instance of Configuration.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/validation_error_reporter/configuration.rb', line 6 def initialize( = {}) @to = .delete(:to) @from = .delete(:from) @notifiers = [] @notifiers << Notifiers::Console.new(self) @notifiers << Notifiers::Email.new(self) if @to && @from @profiler = Profiler.new end |
Instance Attribute Details
#from ⇒ Object
Returns the value of attribute from.
4 5 6 |
# File 'lib/validation_error_reporter/configuration.rb', line 4 def from @from end |
#notifiers ⇒ Object
Returns the value of attribute notifiers.
4 5 6 |
# File 'lib/validation_error_reporter/configuration.rb', line 4 def notifiers @notifiers end |
#profiler ⇒ Object
Returns the value of attribute profiler.
4 5 6 |
# File 'lib/validation_error_reporter/configuration.rb', line 4 def profiler @profiler end |
#to ⇒ Object
Returns the value of attribute to.
4 5 6 |
# File 'lib/validation_error_reporter/configuration.rb', line 4 def to @to end |