Class: Brut::FrontEnd::Handlers::InstrumentationHandler::Event
- Inherits:
-
Data
- Object
- Data
- Brut::FrontEnd::Handlers::InstrumentationHandler::Event
- Defined in:
- lib/brut/front_end/handlers/instrumentation_handler.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Class Method Summary collapse
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes
3 4 5 |
# File 'lib/brut/front_end/handlers/instrumentation_handler.rb', line 3 def attributes @attributes end |
#name ⇒ Object (readonly)
Returns the value of attribute name
3 4 5 |
# File 'lib/brut/front_end/handlers/instrumentation_handler.rb', line 3 def name @name end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp
3 4 5 |
# File 'lib/brut/front_end/handlers/instrumentation_handler.rb', line 3 def @timestamp end |
Class Method Details
.from_json(json) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/brut/front_end/handlers/instrumentation_handler.rb', line 4 def self.from_json(json) name = json["name"] = Time.at(json["timestamp"].to_i / 1000.0) attributes = json["attributes"] || {} self.new(name:,timestamp:,attributes:) end |