Class: StoredReporter::ContextResult
- Inherits:
-
Object
- Object
- StoredReporter::ContextResult
- Defined in:
- lib/dashboard/stored_reporter.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
Returns the value of attribute children.
-
#desc ⇒ Object
Returns the value of attribute desc.
-
#fails ⇒ Object
Returns the value of attribute fails.
-
#passes ⇒ Object
Returns the value of attribute passes.
-
#requests ⇒ Object
Returns the value of attribute requests.
Instance Method Summary collapse
- #fail(fail) ⇒ Object
-
#initialize(context) ⇒ ContextResult
constructor
A new instance of ContextResult.
- #pass(pass) ⇒ Object
- #passed? ⇒ Boolean
Constructor Details
#initialize(context) ⇒ ContextResult
Returns a new instance of ContextResult.
5 6 7 8 9 10 11 12 |
# File 'lib/dashboard/stored_reporter.rb', line 5 def initialize context @fails = [] @passes = [] @requests = [] @children = [] @desc = context.description end |
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children.
3 4 5 |
# File 'lib/dashboard/stored_reporter.rb', line 3 def children @children end |
#desc ⇒ Object
Returns the value of attribute desc.
3 4 5 |
# File 'lib/dashboard/stored_reporter.rb', line 3 def desc @desc end |
#fails ⇒ Object
Returns the value of attribute fails.
3 4 5 |
# File 'lib/dashboard/stored_reporter.rb', line 3 def fails @fails end |
#passes ⇒ Object
Returns the value of attribute passes.
3 4 5 |
# File 'lib/dashboard/stored_reporter.rb', line 3 def passes @passes end |
#requests ⇒ Object
Returns the value of attribute requests.
3 4 5 |
# File 'lib/dashboard/stored_reporter.rb', line 3 def requests @requests end |
Instance Method Details
#fail(fail) ⇒ Object
14 15 16 |
# File 'lib/dashboard/stored_reporter.rb', line 14 def fail fail @fails << fail end |
#pass(pass) ⇒ Object
18 19 20 |
# File 'lib/dashboard/stored_reporter.rb', line 18 def pass pass @passes << pass end |
#passed? ⇒ Boolean
22 23 24 25 26 27 28 29 30 |
# File 'lib/dashboard/stored_reporter.rb', line 22 def passed? return false unless fails.empty? children.each do |c| return false unless c.passed? end return true end |