Exception: Yarrow::Schema::Types::CastError

Inherits:
TypeError
  • Object
show all
Defined in:
lib/yarrow/schema/types.rb

Class Method Summary collapse

Class Method Details

.instance_of(t, u) ⇒ Object



5
6
7
# File 'lib/yarrow/schema/types.rb', line 5

def self.instance_of(t, u)
  new("#{t} is not an instance of #{u}")
end

.kind_of(t, u) ⇒ Object



9
10
11
# File 'lib/yarrow/schema/types.rb', line 9

def self.kind_of(t, u)
  new("#{t} is not a subclass of #{u}")
end

.respond_to_all(t, m) ⇒ Object



17
18
19
# File 'lib/yarrow/schema/types.rb', line 17

def self.respond_to_all(t, m)
  new("#{t} does not implement #{m}")
end

.respond_to_any(t, m) ⇒ Object



13
14
15
# File 'lib/yarrow/schema/types.rb', line 13

def self.respond_to_any(t, m)
  new("#{t} does not implement any of #{m}")
end

.union_member(t, s) ⇒ Object



21
22
23
# File 'lib/yarrow/schema/types.rb', line 21

def self.union_member(t, s)
  new("#{t} is not a member of union")
end