Exception: EventRouter::Errors::RequiredOptionError

Inherits:
EventRouter::Error show all
Defined in:
lib/event_router/errors/required_option_error.rb

Instance Method Summary collapse

Constructor Details

#initialize(message: nil, options:, adapter:) ⇒ RequiredOptionError

Returns a new instance of RequiredOptionError.



8
9
10
11
12
13
# File 'lib/event_router/errors/required_option_error.rb', line 8

def initialize(message: nil, options:, adapter:)
  @options = options
  @adapter = adapter

  super(message || self.message)
end

Instance Method Details

#messageObject



15
16
17
# File 'lib/event_router/errors/required_option_error.rb', line 15

def message
  "#{@options} are required for #{@adapter} adapter."
end