Class: Aikido::Zen::Collector::Events::TrackRoute Private

Inherits:
Aikido::Zen::Collector::Event show all
Defined in:
lib/aikido/zen/collector/event.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary

Attributes inherited from Aikido::Zen::Collector::Event

#type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Aikido::Zen::Collector::Event

register

Constructor Details

#initialize(route, schema) ⇒ TrackRoute

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of TrackRoute.



285
286
287
288
289
# File 'lib/aikido/zen/collector/event.rb', line 285

def initialize(route, schema)
  super()
  @route = route
  @schema = schema
end

Class Method Details

.from_json(data) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



278
279
280
281
282
283
# File 'lib/aikido/zen/collector/event.rb', line 278

def self.from_json(data)
  new(
    Route.from_json(data[:route]),
    Request::Schema.from_json(data[:schema])
  )
end

Instance Method Details

#as_jsonObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



291
292
293
294
295
296
# File 'lib/aikido/zen/collector/event.rb', line 291

def as_json
  super.update({
    route: @route.as_json,
    schema: @schema.as_json
  })
end

#handle(collector) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



298
299
300
# File 'lib/aikido/zen/collector/event.rb', line 298

def handle(collector)
  collector.handle_track_route(@route, @schema)
end

#inspectObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



302
303
304
# File 'lib/aikido/zen/collector/event.rb', line 302

def inspect
  "#<#{self.class.name} #{@route.verb} #{@route.path.inspect}>"
end