Class: SpeedGun::Browser::Timing::Timing

Inherits:
Object
  • Object
show all
Defined in:
lib/speed_gun/browser/timing.rb

Overview

rubocop:enable all

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, base, started_at, ended_at) ⇒ Timing

Returns a new instance of Timing.



31
32
33
34
35
# File 'lib/speed_gun/browser/timing.rb', line 31

def initialize(name, base, started_at, ended_at)
  @name = name
  @started_at = started_at - base
  @elapsed_time = ended_at - started_at
end

Instance Attribute Details

#elapsed_timeObject (readonly)

Returns the value of attribute elapsed_time.



36
37
38
# File 'lib/speed_gun/browser/timing.rb', line 36

def elapsed_time
  @elapsed_time
end

#nameObject (readonly)

Returns the value of attribute name.



36
37
38
# File 'lib/speed_gun/browser/timing.rb', line 36

def name
  @name
end

#started_atObject (readonly)

Returns the value of attribute started_at.



36
37
38
# File 'lib/speed_gun/browser/timing.rb', line 36

def started_at
  @started_at
end