Class: ActiveSpy::Rails::Validation::Event
- Inherits:
-
Object
- Object
- ActiveSpy::Rails::Validation::Event
- Defined in:
- lib/active_spy/rails/validation.rb
Overview
Class responsible to validate event that are send to event-runner instances.
Instance Method Summary collapse
-
#initialize(event_json) ⇒ Event
constructor
A new instance of Event.
-
#validate! ⇒ Object
Validates the
event_json
provided in the initializer.
Constructor Details
#initialize(event_json) ⇒ Event
Returns a new instance of Event.
13 14 15 |
# File 'lib/active_spy/rails/validation.rb', line 13 def initialize(event_json) @event = JSON.load(event_json) end |
Instance Method Details
#validate! ⇒ Object
Validates the event_json
provided in the initializer
(see #initialize)
20 21 22 23 |
# File 'lib/active_spy/rails/validation.rb', line 20 def validate! check_actor_key(@event['event']['actor']) check_realm_key(@event['event']['realm']) end |