Class: Aikido::Zen::Collector::Events::TrackRoute Private
- Inherits:
-
Aikido::Zen::Collector::Event
- Object
- Aikido::Zen::Collector::Event
- Aikido::Zen::Collector::Events::TrackRoute
- 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
Class Method Summary collapse
- .from_json(data) ⇒ Object private
Instance Method Summary collapse
- #as_json ⇒ Object private
- #handle(collector) ⇒ Object private
-
#initialize(route, schema) ⇒ TrackRoute
constructor
private
A new instance of TrackRoute.
- #inspect ⇒ Object private
Methods inherited from Aikido::Zen::Collector::Event
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.
258 259 260 261 262 |
# File 'lib/aikido/zen/collector/event.rb', line 258 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.
251 252 253 254 255 256 |
# File 'lib/aikido/zen/collector/event.rb', line 251 def self.from_json(data) new( Route.from_json(data[:route]), Request::Schema.from_json(data[:schema]) ) end |
Instance Method Details
#as_json ⇒ 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.
264 265 266 267 268 269 |
# File 'lib/aikido/zen/collector/event.rb', line 264 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.
271 272 273 |
# File 'lib/aikido/zen/collector/event.rb', line 271 def handle(collector) collector.handle_track_route(@route, @schema) end |
#inspect ⇒ 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.
275 276 277 |
# File 'lib/aikido/zen/collector/event.rb', line 275 def inspect "#<#{self.class.name} #{@route.verb} #{@route.path.inspect}>" end |