Module: Thy::Types::ClassMethods
- Defined in:
- lib/thy/types.rb
Instance Method Summary collapse
-
#Array(type) ⇒ Object
rubocop:disable Naming/MethodName.
- #ClassExtending(klass) ⇒ Object
- #Enum(*types) ⇒ Object
- #Hash(schema) ⇒ Object
- #InstanceOf(klass) ⇒ Object
- #Map(key_type, value_type) ⇒ Object
- #Option(type) ⇒ Object
- #Variant(*values) ⇒ Object
Instance Method Details
#Array(type) ⇒ Object
rubocop:disable Naming/MethodName
10 11 12 |
# File 'lib/thy/types.rb', line 10 def Array(type) Array.new(type) end |
#ClassExtending(klass) ⇒ Object
38 39 40 |
# File 'lib/thy/types.rb', line 38 def ClassExtending(klass) ClassExtending.new(klass) end |
#Enum(*types) ⇒ Object
22 23 24 |
# File 'lib/thy/types.rb', line 22 def Enum(*types) Enum.new(types) end |
#Hash(schema) ⇒ Object
14 15 16 |
# File 'lib/thy/types.rb', line 14 def Hash(schema) Hash.new(schema) end |
#InstanceOf(klass) ⇒ Object
34 35 36 |
# File 'lib/thy/types.rb', line 34 def InstanceOf(klass) InstanceOf.new(klass) end |
#Map(key_type, value_type) ⇒ Object
18 19 20 |
# File 'lib/thy/types.rb', line 18 def Map(key_type, value_type) Map.new(key_type, value_type) end |
#Option(type) ⇒ Object
30 31 32 |
# File 'lib/thy/types.rb', line 30 def Option(type) Option.new(type) end |
#Variant(*values) ⇒ Object
26 27 28 |
# File 'lib/thy/types.rb', line 26 def Variant(*values) Variant.new(values) end |