Exception: Solid::Result::Contract::Error::UnexpectedType

Inherits:
Solid::Result::Contract::Error show all
Defined in:
lib/solid/result/contract/error.rb

Class Method Summary collapse

Class Method Details

.build(type:, allowed_types:) ⇒ Object



5
6
7
# File 'lib/solid/result/contract/error.rb', line 5

def self.build(type:, allowed_types:)
  new("type :#{type} is not allowed. Allowed types: #{allowed_types.map(&:inspect).join(', ')}")
end