Class: R2OAS::Schema::V3::IncludeRefBaseFileManager

Inherits:
BaseFileManager show all
Defined in:
lib/r2-oas/schema/v3/manager/file/include_ref_base_file_manager.rb

Direct Known Subclasses

ComponentsFileManager, PathItemFileManager

Constant Summary collapse

REF =
'$ref'

Constants inherited from Base

Base::SUPPORT_COMPONENTS_OBJECTS

Instance Attribute Summary

Attributes inherited from BaseFileManager

#original_path

Instance Method Summary collapse

Methods inherited from BaseFileManager

#delete, #load_data, #save, #save_after_deep_merge, #save_file_path

Methods inherited from Base

#support_components_objects

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_pathsObject 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