Class: ResultRow

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec_overview/result_row.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(identifier) ⇒ ResultRow

Returns a new instance of ResultRow.



5
6
7
8
9
# File 'lib/rspec_overview/result_row.rb', line 5

def initialize(identifier)
  @identifier = identifier
  @example_count = 0
  @duration_raw = 0.0
end

Instance Attribute Details

#duration_rawObject

Returns the value of attribute duration_raw.



3
4
5
# File 'lib/rspec_overview/result_row.rb', line 3

def duration_raw
  @duration_raw
end

#example_countObject

Returns the value of attribute example_count.



3
4
5
# File 'lib/rspec_overview/result_row.rb', line 3

def example_count
  @example_count
end

#identifierObject (readonly)

Returns the value of attribute identifier.



2
3
4
# File 'lib/rspec_overview/result_row.rb', line 2

def identifier
  @identifier
end

Instance Method Details

#avg_durationObject



11
12
13
# File 'lib/rspec_overview/result_row.rb', line 11

def avg_duration
  duration_raw / example_count
end