Class: ActiveReporter::Evaluator::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/active_reporter/evaluator/base.rb

Direct Known Subclasses

Block

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, report, options = {}) ⇒ Base

Returns a new instance of Base.



8
9
10
11
12
# File 'lib/active_reporter/evaluator/base.rb', line 8

def initialize(name, report, options = {})
  @name = name
  @report = report
  @options = options
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/active_reporter/evaluator/base.rb', line 6

def name
  @name
end

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/active_reporter/evaluator/base.rb', line 6

def options
  @options
end

#reportObject (readonly)

Returns the value of attribute report.



6
7
8
# File 'lib/active_reporter/evaluator/base.rb', line 6

def report
  @report
end

Instance Method Details

#default_valueObject



14
15
16
# File 'lib/active_reporter/evaluator/base.rb', line 14

def default_value
  options.fetch(:default_value, nil)
end