Class: Cucumber::Formatter::DurationExtractor
- Inherits:
-
Object
- Object
- 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
- #attach ⇒ Object
- #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.
8 9 10 11 |
# File 'lib/cucumber/formatter/duration_extractor.rb', line 8 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.
6 7 8 |
# File 'lib/cucumber/formatter/duration_extractor.rb', line 6 def result_duration @result_duration end |
Instance Method Details
#attach ⇒ Object
29 |
# File 'lib/cucumber/formatter/duration_extractor.rb', line 29 def attach(*) end |
#duration(duration) ⇒ Object
25 26 27 |
# File 'lib/cucumber/formatter/duration_extractor.rb', line 25 def duration(duration, *) duration.tap { |dur| @result_duration = dur.nanoseconds / 10**9.0 } end |
#exception ⇒ Object
23 |
# File 'lib/cucumber/formatter/duration_extractor.rb', line 23 def exception(*) end |
#failed ⇒ Object
15 |
# File 'lib/cucumber/formatter/duration_extractor.rb', line 15 def failed(*) end |
#passed ⇒ Object
13 |
# File 'lib/cucumber/formatter/duration_extractor.rb', line 13 def passed(*) end |
#pending ⇒ Object
21 |
# File 'lib/cucumber/formatter/duration_extractor.rb', line 21 def pending(*) end |
#skipped ⇒ Object
19 |
# File 'lib/cucumber/formatter/duration_extractor.rb', line 19 def skipped(*) end |
#undefined ⇒ Object
17 |
# File 'lib/cucumber/formatter/duration_extractor.rb', line 17 def undefined(*) end |