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, opts = {}) ⇒ Base

Returns a new instance of Base.



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

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/active_reporter/evaluator/base.rb', line 4

def name
  @name
end

#optsObject (readonly)

Returns the value of attribute opts.



4
5
6
# File 'lib/active_reporter/evaluator/base.rb', line 4

def opts
  @opts
end

#reportObject (readonly)

Returns the value of attribute report.



4
5
6
# File 'lib/active_reporter/evaluator/base.rb', line 4

def report
  @report
end

Instance Method Details

#default_valueObject



12
13
14
# File 'lib/active_reporter/evaluator/base.rb', line 12

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