Class: OptionsValidator
- Inherits:
-
Object
- Object
- OptionsValidator
- Defined in:
- lib/pheromone/options_validator.rb
Overview
validate message options provided to publish method in Publishable concern
Constant Summary collapse
- ACCEPTED_EVENT_TYPES =
i(create update).freeze
Instance Method Summary collapse
-
#initialize(message_options) ⇒ OptionsValidator
constructor
A new instance of OptionsValidator.
- #validate ⇒ Object
Constructor Details
#initialize(message_options) ⇒ OptionsValidator
6 7 8 9 |
# File 'lib/pheromone/options_validator.rb', line 6 def initialize() @errors = {} = end |
Instance Method Details
#validate ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/pheromone/options_validator.rb', line 11 def validate return @errors if @errors.present? validate_topic validate_event_types @errors end |