Module: PairKit::JsonSchema::Dsl::TypePartialDsl::Base
- Defined in:
- lib/pair_kit/json_schema/dsl/partials/type_partial_dsl.rb
Instance Method Summary collapse
- #arr(&block) ⇒ Object (also: #array)
- #bool(&block) ⇒ Object (also: #boolean)
- #int(&block) ⇒ Object (also: #integer)
- #null ⇒ Object
- #num(&block) ⇒ Object (also: #number, #float, #flt)
- #obj(&block) ⇒ Object (also: #object, #struct)
- #str(&block) ⇒ Object (also: #string)
Instance Method Details
#arr(&block) ⇒ Object Also known as: array
41 42 43 |
# File 'lib/pair_kit/json_schema/dsl/partials/type_partial_dsl.rb', line 41 def arr(&block) type!('array', &block) end |
#bool(&block) ⇒ Object Also known as: boolean
20 21 22 |
# File 'lib/pair_kit/json_schema/dsl/partials/type_partial_dsl.rb', line 20 def bool(&block) type!('boolean', &block) end |
#int(&block) ⇒ Object Also known as: integer
14 15 16 |
# File 'lib/pair_kit/json_schema/dsl/partials/type_partial_dsl.rb', line 14 def int(&block) type!('integer', &block) end |
#null ⇒ Object
47 48 49 |
# File 'lib/pair_kit/json_schema/dsl/partials/type_partial_dsl.rb', line 47 def null type!('null') end |
#num(&block) ⇒ Object Also known as: number, float, flt
26 27 28 |
# File 'lib/pair_kit/json_schema/dsl/partials/type_partial_dsl.rb', line 26 def num(&block) type!('number', &block) end |
#obj(&block) ⇒ Object Also known as: object, struct
34 35 36 |
# File 'lib/pair_kit/json_schema/dsl/partials/type_partial_dsl.rb', line 34 def obj(&block) type!('object', &block) end |
#str(&block) ⇒ Object Also known as: string
8 9 10 |
# File 'lib/pair_kit/json_schema/dsl/partials/type_partial_dsl.rb', line 8 def str(&block) type!('string', &block) end |