Class: CloseYourIt::Event
- Inherits:
-
Object
- Object
- CloseYourIt::Event
- Defined in:
- lib/closeyourit/event.rb
Overview
Base degli eventi di telemetria. Le sottoclassi implementano ‘#to_h` e `#ingest_path` (il path API a cui l’evento va spedito: errori → /events, metriche → /metrics).
Direct Known Subclasses
Instance Method Summary collapse
- #ingest_path(_project_id) ⇒ Object
-
#initialize(configuration) ⇒ Event
constructor
A new instance of Event.
- #to_h ⇒ Object
Constructor Details
#initialize(configuration) ⇒ Event
Returns a new instance of Event.
10 11 12 13 |
# File 'lib/closeyourit/event.rb', line 10 def initialize(configuration) @configuration = configuration @occurred_at = Time.now.utc.iso8601 end |
Instance Method Details
#ingest_path(_project_id) ⇒ Object
19 20 21 |
# File 'lib/closeyourit/event.rb', line 19 def ingest_path(_project_id) raise NotImplementedError, "#{self.class} deve implementare #ingest_path" end |
#to_h ⇒ Object
15 16 17 |
# File 'lib/closeyourit/event.rb', line 15 def to_h raise NotImplementedError, "#{self.class} deve implementare #to_h" end |