module Thy::Types::ClassMethods
Public Instance Methods
Array(type)
click to toggle source
rubocop:disable Naming/MethodName
# File lib/thy/types.rb, line 10 def Array(type) Array.new(type) end
ClassExtending(klass)
click to toggle source
# File lib/thy/types.rb, line 38 def ClassExtending(klass) ClassExtending.new(klass) end
Enum(*types)
click to toggle source
# File lib/thy/types.rb, line 22 def Enum(*types) Enum.new(types) end
Hash(schema)
click to toggle source
# File lib/thy/types.rb, line 14 def Hash(schema) Hash.new(schema) end
InstanceOf(klass)
click to toggle source
# File lib/thy/types.rb, line 34 def InstanceOf(klass) InstanceOf.new(klass) end
Map(key_type, value_type)
click to toggle source
# File lib/thy/types.rb, line 18 def Map(key_type, value_type) Map.new(key_type, value_type) end
Option(type)
click to toggle source
# File lib/thy/types.rb, line 30 def Option(type) Option.new(type) end
Variant(*values)
click to toggle source
# File lib/thy/types.rb, line 26 def Variant(*values) Variant.new(values) end