Class: JsonSchemaView::BaseProps Abstract
- Inherits:
-
Object
- Object
- JsonSchemaView::BaseProps
- Includes:
- JsonSchemaDefinable
- Defined in:
- lib/json_schema_view/base_props.rb
Overview
This class is abstract.
Class Method Summary collapse
-
.component_class ⇒ Class<BaseComponent>
The component class this class belongs to.
-
.component_name ⇒ String
The name of its component class.
- .description ⇒ String
-
.title ⇒ String
Its component name with Props suffix.
Methods included from JsonWorldExtensions::Validatable
Methods included from JsonWorldExtensions::CompactOptionalProperties
Class Method Details
.component_class ⇒ Class<BaseComponent>
Returns the component class this class belongs to.
27 28 29 |
# File 'lib/json_schema_view/base_props.rb', line 27 def component_class module_parent end |
.component_name ⇒ String
Returns The name of its component class.
22 23 24 |
# File 'lib/json_schema_view/base_props.rb', line 22 def component_name component_class.name end |
.description ⇒ String
Note:
Override of JsonWorld::DSL::ClassMethods#description
17 18 19 |
# File 'lib/json_schema_view/base_props.rb', line 17 def description "The property of #{ActiveSupport::Inflector.demodulize(component_name)}." end |
.title ⇒ String
Note:
Override of JsonWorld::DSL::ClassMethods#title
Returns its component name with Props suffix.
11 12 13 |
# File 'lib/json_schema_view/base_props.rb', line 11 def title "#{ActiveSupport::Inflector.demodulize(component_name)}Props" end |