Module: Thy::Types::ClassMethods
- Defined in:
- lib/thy/types.rb
Instance Method Summary collapse
-
#Array(type) ⇒ Object
rubocop:disable Naming/MethodName.
- #Enum(*types) ⇒ Object
- #Hash(schema) ⇒ 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 |
#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 |
#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 |