Method: CodeRunner::Run::FortranNamelist.correct_namelist_cases
- Defined in:
- lib/coderunner/fortran_namelist.rb
.correct_namelist_cases ⇒ Object
For backward compatibility: ensures that all variables (NB variables, not code_variables) are lower case in the namelist database
175 176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/coderunner/fortran_namelist.rb', line 175 def self.correct_namelist_cases rcp.namelists.each do |namelist, namelist_hash| namelist_hash[:variables].each do |var, varhash| #p var if var.to_s =~ /[A-Z]/ or var.kind_of? String p var namelist_hash[:variables].delete(var) namelist_hash[:variables][var.to_s.downcase.to_sym] = varhash end end end save_namelists end |