Method: CodeRunner::Run::FortranNamelist.get_aggregated_source_code_text

Defined in:
lib/coderunner/fortran_namelist.rb

.get_aggregated_source_code_text(source_code_folder) ⇒ Object



1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
# File 'lib/coderunner/fortran_namelist.rb', line 1075

def self.get_aggregated_source_code_text(source_code_folder)
  #p 'source_code_folder', source_code_folder
  string = ""
  (rcp.source_code_subfolders.map{|f| '/' + f} + [""]).map{|f| source_code_folder + f}.each do |folder|
    Dir.chdir(folder) do 
      Dir.entries.each do |file|
        next unless file =~ rcp.fortran_namelist_source_file_match
        next if file =~ /ingen/
        ep file
        text = File.read(file) + "\n"
        text =~ /a/
        string += text
      end
    end
  end
  string
end