Class: Jsapi::Meta::Schema::Validation::Base
- Inherits:
-
Object
- Object
- Jsapi::Meta::Schema::Validation::Base
show all
- Defined in:
- lib/jsapi/meta/schema/validation/base.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(value) ⇒ Base
14
15
16
|
# File 'lib/jsapi/meta/schema/validation/base.rb', line 14
def initialize(value)
@value = value
end
|
Instance Attribute Details
Returns the value of attribute value.
12
13
14
|
# File 'lib/jsapi/meta/schema/validation/base.rb', line 12
def value
@value
end
|
Class Method Details
8
9
10
|
# File 'lib/jsapi/meta/schema/validation/base.rb', line 8
def self.keyword
@keyword ||= name.demodulize.camelize(:lower).to_sym
end
|
Instance Method Details
#to_json_schema_validation ⇒ Object
18
19
20
|
# File 'lib/jsapi/meta/schema/validation/base.rb', line 18
def to_json_schema_validation
{ self.class.keyword => value }
end
|
#to_openapi_validation ⇒ Object
22
23
24
|
# File 'lib/jsapi/meta/schema/validation/base.rb', line 22
def to_openapi_validation(*)
to_json_schema_validation
end
|