Class: Cucumber::Formatter::DurationExtractor
- Defined in:
- lib/cucumber/formatter/duration_extractor.rb
Instance Attribute Summary collapse
-
#result_duration ⇒ Object
readonly
Returns the value of attribute result_duration.
Instance Method Summary collapse
- #duration(duration) ⇒ Object
- #exception ⇒ Object
- #failed ⇒ Object
-
#initialize(result) ⇒ DurationExtractor
constructor
A new instance of DurationExtractor.
- #passed ⇒ Object
- #pending ⇒ Object
- #skipped ⇒ Object
- #undefined ⇒ Object
Constructor Details
#initialize(result) ⇒ DurationExtractor
Returns a new instance of DurationExtractor.
6 7 8 9 |
# File 'lib/cucumber/formatter/duration_extractor.rb', line 6 def initialize(result) @result_duration = 0 result.describe_to(self) end |
Instance Attribute Details
#result_duration ⇒ Object (readonly)
Returns the value of attribute result_duration.
5 6 7 |
# File 'lib/cucumber/formatter/duration_extractor.rb', line 5 def result_duration @result_duration end |
Instance Method Details
#duration(duration) ⇒ Object
23 24 25 |
# File 'lib/cucumber/formatter/duration_extractor.rb', line 23 def duration(duration, *) duration.tap { |duration| @result_duration = duration.nanoseconds / 10**9.0 } end |
#exception ⇒ Object
21 |
# File 'lib/cucumber/formatter/duration_extractor.rb', line 21 def exception(*) end |
#failed ⇒ Object
13 |
# File 'lib/cucumber/formatter/duration_extractor.rb', line 13 def failed(*) end |
#passed ⇒ Object
11 |
# File 'lib/cucumber/formatter/duration_extractor.rb', line 11 def passed(*) end |
#pending ⇒ Object
19 |
# File 'lib/cucumber/formatter/duration_extractor.rb', line 19 def pending(*) end |
#skipped ⇒ Object
17 |
# File 'lib/cucumber/formatter/duration_extractor.rb', line 17 def skipped(*) end |
#undefined ⇒ Object
15 |
# File 'lib/cucumber/formatter/duration_extractor.rb', line 15 def undefined(*) end |