Class: Cucumber::Formatter::DurationExtractor

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/formatter/duration_extractor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_durationObject (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

#attachObject



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

#exceptionObject



23
# File 'lib/cucumber/formatter/duration_extractor.rb', line 23

def exception(*) end

#failedObject



15
# File 'lib/cucumber/formatter/duration_extractor.rb', line 15

def failed(*) end

#passedObject



13
# File 'lib/cucumber/formatter/duration_extractor.rb', line 13

def passed(*) end

#pendingObject



21
# File 'lib/cucumber/formatter/duration_extractor.rb', line 21

def pending(*) end

#skippedObject



19
# File 'lib/cucumber/formatter/duration_extractor.rb', line 19

def skipped(*) end

#undefinedObject



17
# File 'lib/cucumber/formatter/duration_extractor.rb', line 17

def undefined(*) end