Class: RSpec::Notifications::Subscriber::Event
- Inherits:
-
Struct
- Object
- Struct
- RSpec::Notifications::Subscriber::Event
- Defined in:
- lib/rspec/notifications/subscriber.rb
Instance Attribute Summary collapse
-
#finished ⇒ Object
Returns the value of attribute finished.
-
#name ⇒ Object
Returns the value of attribute name.
-
#payload ⇒ Object
Returns the value of attribute payload.
-
#started ⇒ Object
Returns the value of attribute started.
-
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
Instance Method Summary collapse
-
#duration ⇒ Object
Duration in milliseconds, when both timestamps are available.
Instance Attribute Details
#finished ⇒ Object
Returns the value of attribute finished
9 10 11 |
# File 'lib/rspec/notifications/subscriber.rb', line 9 def finished @finished end |
#name ⇒ Object
Returns the value of attribute name
9 10 11 |
# File 'lib/rspec/notifications/subscriber.rb', line 9 def name @name end |
#payload ⇒ Object
Returns the value of attribute payload
9 10 11 |
# File 'lib/rspec/notifications/subscriber.rb', line 9 def payload @payload end |
#started ⇒ Object
Returns the value of attribute started
9 10 11 |
# File 'lib/rspec/notifications/subscriber.rb', line 9 def started @started end |
#transaction_id ⇒ Object
Returns the value of attribute transaction_id
9 10 11 |
# File 'lib/rspec/notifications/subscriber.rb', line 9 def transaction_id @transaction_id end |
Instance Method Details
#duration ⇒ Object
Duration in milliseconds, when both timestamps are available.
18 19 20 21 22 |
# File 'lib/rspec/notifications/subscriber.rb', line 18 def duration return unless started && finished (finished - started) * 1_000.0 end |