Class: JSON::Schema::NumericLimitAttribute
- Inherits:
-
LimitAttribute
- Object
- Attribute
- LimitAttribute
- JSON::Schema::NumericLimitAttribute
- Defined in:
- lib/json-schema/attributes/limits/numeric.rb
Direct Known Subclasses
Constant Summary
Constants inherited from Attribute
Attribute::TYPE_CLASS_MAPPINGS
Class Method Summary collapse
Methods inherited from LimitAttribute
exclusive?, invalid?, limit, limit_name, validate, value
Methods inherited from Attribute
build_fragment, data_valid_for_type?, type_of_data, validate, validation_error, validation_errors
Class Method Details
.acceptable_type ⇒ Object
6 7 8 |
# File 'lib/json-schema/attributes/limits/numeric.rb', line 6 def self.acceptable_type Numeric end |
.error_message(schema) ⇒ Object
10 11 12 13 |
# File 'lib/json-schema/attributes/limits/numeric.rb', line 10 def self.(schema) exclusivity = exclusive?(schema) ? 'exclusively' : 'inclusively' format('did not have a %s value of %s, %s', limit_name, limit(schema), exclusivity) end |