class JsonSchema::Artesano::Tools::Static
Public Class Methods
new()
click to toggle source
# File lib/json_schema/artesano/tools/static.rb, line 12 def initialize end
Public Instance Methods
select_anyof(materials)
click to toggle source
# File lib/json_schema/artesano/tools/static.rb, line 44 def select_anyof(materials) materials[0] end
select_oneof(materials)
click to toggle source
# File lib/json_schema/artesano/tools/static.rb, line 40 def select_oneof(materials) materials[0] end
shape_array(material)
click to toggle source
# File lib/json_schema/artesano/tools/static.rb, line 19 def shape_array(material) material end
shape_enum(material)
click to toggle source
# File lib/json_schema/artesano/tools/static.rb, line 36 def shape_enum(material) material.enum[0] end
shape_object(material)
click to toggle source
# File lib/json_schema/artesano/tools/static.rb, line 15 def shape_object(material) material end
shape_primitive(material)
click to toggle source
# File lib/json_schema/artesano/tools/static.rb, line 23 def shape_primitive(material) case material.type[0] when 'boolean' false when 'integer' 22 when 'number' 22.15 when 'string' 'Lorem ipsum dolor sit amet' end end