Exception: Eco::API::UseCases::BaseCase::InvalidType

Inherits:
StandardError
  • Object
show all
Defined in:
lib/eco/api/usecases/base_case.rb

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil, type:, types:) ⇒ InvalidType

Returns a new instance of InvalidType.



7
8
9
10
11
# File 'lib/eco/api/usecases/base_case.rb', line 7

def initialize(msg = nil, type:, types:)
  msg ||= "Invalid type. "
  msg  << "Given type '#{type}'. Valid types: #{types}"
  super(msg)
end