Class: R2OAS::Schema::V3::IncludeRefBaseFileManager
- Inherits:
-
BaseFileManager
- Object
- Base
- Base
- Base
- BaseFileManager
- R2OAS::Schema::V3::IncludeRefBaseFileManager
- Defined in:
- lib/r2-oas/schema/v3/manager/file/include_ref_base_file_manager.rb
Direct Known Subclasses
Constant Summary collapse
- REF =
'$ref'
Constants inherited from Base
Base::SUPPORT_COMPONENTS_OBJECTS
Instance Attribute Summary
Attributes inherited from BaseFileManager
Instance Method Summary collapse
- #descendants_paths ⇒ Object (also: #descendants_ref_paths)
-
#initialize(path, path_type = :ref) ⇒ IncludeRefBaseFileManager
constructor
A new instance of IncludeRefBaseFileManager.
Methods inherited from BaseFileManager
#delete, #load_data, #save, #save_after_deep_merge, #save_file_path
Methods inherited from Base
Constructor Details
#initialize(path, path_type = :ref) ⇒ IncludeRefBaseFileManager
Returns a new instance of IncludeRefBaseFileManager.
12 13 14 15 16 17 |
# File 'lib/r2-oas/schema/v3/manager/file/include_ref_base_file_manager.rb', line 12 def initialize(path, path_type = :ref) super @convert_underscore_to_slash = true @parent_save_file_paths = [] @recursive_search_class = self.class end |
Instance Method Details
#descendants_paths ⇒ Object Also known as: descendants_ref_paths
23 24 25 26 27 28 29 30 31 |
# File 'lib/r2-oas/schema/v3/manager/file/include_ref_base_file_manager.rb', line 23 def descendants_paths results = [] deep_search_ref_recursive(load_data) do |relative_paths| results.push(*relative_paths) end results.uniq end |