Method: Ecic::SourceFileInfo#get_default_library_dir_from_file_path

Defined in:
lib/ecic/source_file_info.rb

#get_default_library_dir_from_file_pathObject

Function that returns the name of the directory that is placed just under src/design or src/testbench:



69
70
71
72
73
74
75
# File 'lib/ecic/source_file_info.rb', line 69

def get_default_library_dir_from_file_path
  #Get the first directory name after src/design or src/testbench:
  rel_design_path_list = @relative_path_from_project.to_s.split('/')
  return nil if rel_design_path_list.length < 3
  return nil unless STANDARD_LIBRARY_FOLDERS_LIST.include? [rel_design_path_list.first(2)].join('/')
  Pathname.new([rel_design_path_list.first(3)].join('/'))
end