Module: Pema

Defined in:
lib/primate/pema.rb,
sig/primate.rbs

Defined Under Namespace

Classes: BooleanType, Field, FloatType, IntType, Schema, StringType, ValidationError

Class Method Summary collapse

Class Method Details

.boolean ⇒ BooleanType

Returns:



97
98
99
# File 'lib/primate/pema.rb', line 97

def self.boolean
  BooleanType.new
end

.float ⇒ FloatType

Returns:



105
106
107
# File 'lib/primate/pema.rb', line 105

def self.float
  FloatType.new
end

.int ⇒ IntType

Returns:



101
102
103
# File 'lib/primate/pema.rb', line 101

def self.int
  IntType.new
end

.schema(fields) ⇒ Schema

Parameters:

  • fields (Hash[String, Field])

Returns:



131
132
133
# File 'lib/primate/pema.rb', line 131

def self.schema(fields)
  Schema.new(fields)
end

.string ⇒ StringType

Returns:



93
94
95
# File 'lib/primate/pema.rb', line 93

def self.string
  StringType.new
end