Class: SchemaTest::Property::Date

Inherits:
SchemaTest::Property show all
Defined in:
lib/schema_test/property.rb

Constant Summary

Constants inherited from SchemaTest::Property

NULL_TYPE

Instance Attribute Summary

Attributes inherited from SchemaTest::Property

#_type, #description, #name

Instance Method Summary collapse

Methods inherited from SchemaTest::Property

#==, #as_json_schema, #json_schema_type, #lookup_object, #nullable, #nullable!, #nullable?, #optional, #optional!, #optional?, #type

Constructor Details

#initialize(name, description = nil) ⇒ Date

Returns a new instance of Date.



115
116
117
# File 'lib/schema_test/property.rb', line 115

def initialize(name, description=nil)
  super(name, :date, description)
end

Instance Method Details

#base_json_schema_typeObject



119
120
121
# File 'lib/schema_test/property.rb', line 119

def base_json_schema_type
  'string'
end

#json_schema_formatObject



123
124
125
# File 'lib/schema_test/property.rb', line 123

def json_schema_format
  'date'
end