Class: SpeedGun::Browser::Timing::Timing
- Inherits:
-
Object
- Object
- SpeedGun::Browser::Timing::Timing
- Defined in:
- lib/speed_gun/browser/timing.rb
Overview
rubocop:enable all
Instance Attribute Summary collapse
-
#elapsed_time ⇒ Object
readonly
Returns the value of attribute elapsed_time.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#started_at ⇒ Object
readonly
Returns the value of attribute started_at.
Instance Method Summary collapse
-
#initialize(name, base, started_at, ended_at) ⇒ Timing
constructor
A new instance of Timing.
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_time ⇒ Object (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 |
#name ⇒ Object (readonly)
Returns the value of attribute name.
36 37 38 |
# File 'lib/speed_gun/browser/timing.rb', line 36 def name @name end |
#started_at ⇒ Object (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 |