Class: Outliers::Result
- Inherits:
-
Object
- Object
- Outliers::Result
- Defined in:
- lib/outliers/result.rb
Instance Attribute Summary collapse
-
#evaluation ⇒ Object
readonly
Returns the value of attribute evaluation.
-
#failing_resources ⇒ Object
readonly
Returns the value of attribute failing_resources.
-
#passing_resources ⇒ Object
readonly
Returns the value of attribute passing_resources.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
-
#verification ⇒ Object
readonly
Returns the value of attribute verification.
Instance Method Summary collapse
- #failed? ⇒ Boolean
-
#initialize(args) ⇒ Result
constructor
A new instance of Result.
- #passed? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(args) ⇒ Result
Returns a new instance of Result.
6 7 8 9 10 11 12 |
# File 'lib/outliers/result.rb', line 6 def initialize(args) @evaluation = args[:evaluation] @failing_resources = args[:failing_resources] @passing_resources = args[:passing_resources] @resource = args[:resource] @verification = args[:verification] end |
Instance Attribute Details
#evaluation ⇒ Object (readonly)
Returns the value of attribute evaluation.
4 5 6 |
# File 'lib/outliers/result.rb', line 4 def evaluation @evaluation end |
#failing_resources ⇒ Object (readonly)
Returns the value of attribute failing_resources.
4 5 6 |
# File 'lib/outliers/result.rb', line 4 def failing_resources @failing_resources end |
#passing_resources ⇒ Object (readonly)
Returns the value of attribute passing_resources.
4 5 6 |
# File 'lib/outliers/result.rb', line 4 def passing_resources @passing_resources end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
4 5 6 |
# File 'lib/outliers/result.rb', line 4 def resource @resource end |
#verification ⇒ Object (readonly)
Returns the value of attribute verification.
4 5 6 |
# File 'lib/outliers/result.rb', line 4 def verification @verification end |
Instance Method Details
#failed? ⇒ Boolean
22 23 24 |
# File 'lib/outliers/result.rb', line 22 def failed? @failing_resources.any? end |
#passed? ⇒ Boolean
18 19 20 |
# File 'lib/outliers/result.rb', line 18 def passed? !failed? end |
#to_s ⇒ Object
14 15 16 |
# File 'lib/outliers/result.rb', line 14 def to_s passed? ? 'passed' : 'failed' end |