Class: SexyJSONSchemas::Properties::Number
- Inherits:
-
Base
- Object
- Base
- SexyJSONSchemas::Properties::Number
show all
- Defined in:
- lib/sexy_json_schemas/properties/number.rb
Instance Attribute Summary
Attributes inherited from Base
#name
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
8
9
10
11
12
13
14
15
16
17
18
|
# File 'lib/sexy_json_schemas/properties/number.rb', line 8
def as_json
super.tap do |json|
if @options[:minimum]
json['minimum'] = @options[:minimum]
end
if @options[:maximum]
json['maximum'] = @options[:maximum]
end
end
end
|
4
5
6
|
# File 'lib/sexy_json_schemas/properties/number.rb', line 4
def type
"number"
end
|