Exception: Solid::Result::Error::UnhandledTypes

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

Class Method Summary collapse

Class Method Details

.build(types:) ⇒ Object



44
45
46
47
48
# File 'lib/solid/result/error.rb', line 44

def self.build(types:)
  source = types.size == 1 ? 'This was' : 'These were'

  new("You must handle all cases. #{source} not handled: #{types.map(&:inspect).join(', ')}")
end