Class: ValidationErrorReporter::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/validation_error_reporter/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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(options = {})
  @to = options.delete(:to)
  @from = options.delete(:from)

  @notifiers = []
  @notifiers << Notifiers::Console.new(self)
  @notifiers << Notifiers::Email.new(self) if @to && @from

  @profiler = Profiler.new
end

Instance Attribute Details

#fromObject

Returns the value of attribute from.



4
5
6
# File 'lib/validation_error_reporter/configuration.rb', line 4

def from
  @from
end

#notifiersObject

Returns the value of attribute notifiers.



4
5
6
# File 'lib/validation_error_reporter/configuration.rb', line 4

def notifiers
  @notifiers
end

#profilerObject

Returns the value of attribute profiler.



4
5
6
# File 'lib/validation_error_reporter/configuration.rb', line 4

def profiler
  @profiler
end

#toObject

Returns the value of attribute to.



4
5
6
# File 'lib/validation_error_reporter/configuration.rb', line 4

def to
  @to
end