Class: Konacha::Reporter::Example
- Inherits:
-
Object
- Object
- Konacha::Reporter::Example
- Defined in:
- lib/konacha/reporter/example.rb
Instance Attribute Summary collapse
-
#metadata ⇒ Object
(also: #options)
readonly
Returns the value of attribute metadata.
-
#parent ⇒ Object
(also: #example_group)
readonly
Returns the value of attribute parent.
Instance Method Summary collapse
- #[](key) ⇒ Object
- #failed? ⇒ Boolean
-
#initialize(data, parent) ⇒ Example
constructor
A new instance of Example.
- #passed? ⇒ Boolean
- #update_metadata(data) ⇒ Object
Constructor Details
Instance Attribute Details
#metadata ⇒ Object (readonly) Also known as: options
Returns the value of attribute metadata.
8 9 10 |
# File 'lib/konacha/reporter/example.rb', line 8 def @metadata end |
#parent ⇒ Object (readonly) Also known as: example_group
Returns the value of attribute parent.
8 9 10 |
# File 'lib/konacha/reporter/example.rb', line 8 def parent @parent end |
Instance Method Details
#[](key) ⇒ Object
36 37 38 |
# File 'lib/konacha/reporter/example.rb', line 36 def [](key) respond_to?(key) ? send(key) : [key] end |
#failed? ⇒ Boolean
28 29 30 |
# File 'lib/konacha/reporter/example.rb', line 28 def failed? execution_result[:status] == "failed" end |
#passed? ⇒ Boolean
24 25 26 |
# File 'lib/konacha/reporter/example.rb', line 24 def passed? execution_result[:status] == "passed" end |
#update_metadata(data) ⇒ Object
32 33 34 |
# File 'lib/konacha/reporter/example.rb', line 32 def (data) .update(data) end |