Class: RDStation::ErrorHandler::InvalidEventType

Inherits:
Object
  • Object
show all
Defined in:
lib/rdstation/error_handler/invalid_event_type.rb

Constant Summary collapse

ERROR_CODE =
'INVALID_OPTION'.freeze
PATH =
'$.event_type'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ InvalidEventType

Returns a new instance of InvalidEventType.



9
10
11
# File 'lib/rdstation/error_handler/invalid_event_type.rb', line 9

def initialize(errors)
  @errors = errors
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



4
5
6
# File 'lib/rdstation/error_handler/invalid_event_type.rb', line 4

def errors
  @errors
end

Instance Method Details

#raise_errorObject



13
14
15
16
# File 'lib/rdstation/error_handler/invalid_event_type.rb', line 13

def raise_error
  return if invalid_event_type_error.empty?
  raise RDStation::Error::InvalidEventType, invalid_event_type_error.first
end