Class: ActiveReporter::Evaluator::Base
- Inherits:
-
Object
- Object
- ActiveReporter::Evaluator::Base
- Defined in:
- lib/active_reporter/evaluator/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
-
#report ⇒ Object
readonly
Returns the value of attribute report.
Instance Method Summary collapse
- #default_value ⇒ Object
-
#initialize(name, report, opts = {}) ⇒ Base
constructor
A new instance of Base.
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
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/active_reporter/evaluator/base.rb', line 4 def name @name end |
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
4 5 6 |
# File 'lib/active_reporter/evaluator/base.rb', line 4 def opts @opts end |
#report ⇒ Object (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_value ⇒ Object
12 13 14 |
# File 'lib/active_reporter/evaluator/base.rb', line 12 def default_value opts.fetch(:default_value, nil) end |