Class: Vk::Schema::Definition::Object
- Inherits:
-
Constant
- Object
- Vk::Schema::Definition
- Constant
- Vk::Schema::Definition::Object
- Includes:
- HasAttributes
- Defined in:
- lib/vk/schema/definition/object.rb
Instance Attribute Summary
Attributes inherited from Constant
Attributes inherited from Vk::Schema::Definition
Instance Method Summary collapse
Methods included from HasAttributes
#attributes, #properties, #required_attribute?
Methods inherited from Constant
#definition_file, #initialize, #namespace, namespace_splitter, #referenced_type_name, #require, #spec_file, #type_name
Methods inherited from Vk::Schema::Definition
#description, #initialize, #to_s
Constructor Details
This class inherits a constructor from Vk::Schema::Definition::Constant
Instance Method Details
#dry_type ⇒ String
23 24 25 |
# File 'lib/vk/schema/definition/object.rb', line 23 def dry_type "Dry::Types[#{referenced_type_name}]" end |
#parent ⇒ String
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/vk/schema/definition/object.rb', line 11 def parent if definition['type'] == 'object' 'Vk::Schema::Object' else reference = definition['allOf'].detect do |definition| definition['$ref'] end schema.definition_of(reference['$ref']).referenced_type_name end end |