Module | Kwalify::Types
In: | kwalify/types.rb

### Methods

collection? collection_type? get_type_class scalar? scalar_type? type_class type_table

### Constants

DEFAULT_TYPE | = | "str"

### Public Class methods

get_type_class(type)

[Source]

    # File kwalify/types.rb, line 119
        def self.get_type_class(type)
          return type_class(type)
        end

type_class(type)

[Source]

    # File kwalify/types.rb, line 113
        def self.type_class(type)
          klass = @@type_table[type]
          #assert_error('type=#{type.inspect}') unless klass
          return klass
        end

type_table()

[Source]

    # File kwalify/types.rb, line 109
        def self.type_table
          return @@type_table
        end

### Public Instance methods

collection?(val)

[Source]

    # File kwalify/types.rb, line 134
        def collection?(val)
          return val.is_a?(Array) || val.is_a?(Hash)
        end

collection_type?(type)

[Source]

    # File kwalify/types.rb, line 143
        def collection_type?(type)
          return type == 'seq' || type == 'map'
        end

scalar?(val)

[Source]

    # File kwalify/types.rb, line 138
        def scalar?(val)
          #return !val.is_a?(Array) && !val.is_a?(Hash) && val.class != Object
          return val.is_a?(Kwalify::Scalar)  #&& val.class != Object
        end

scalar_type?(type)

[Source]

    # File kwalify/types.rb, line 147
        def scalar_type?(type)
          return type != 'seq' && type != 'map' && type == 'any'
        end

[Validate]