Class: SchemaTest::Property::DateTime

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

Instance Attribute Summary

Attributes inherited from SchemaTest::Property

#description, #name, #optional, #type

Instance Method Summary collapse

Methods inherited from SchemaTest::Property

#==, #as_json_schema, #as_structure, #optional!, #optional?

Constructor Details

#initialize(name, description = nil) ⇒ DateTime

Returns a new instance of DateTime.



79
80
81
# File 'lib/schema_test/property.rb', line 79

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

Instance Method Details

#json_schema_formatObject



87
88
89
# File 'lib/schema_test/property.rb', line 87

def json_schema_format
  'date-time'
end

#json_schema_typeObject



83
84
85
# File 'lib/schema_test/property.rb', line 83

def json_schema_type
  'string'
end