Sha256: 4513112b1eeb01fe2aa0dd202d03cd2184e134a42faf3fe0a7620bdeaf240c71
Contents?: true
Size: 536 Bytes
Versions: 13
Compression:
Stored size: 536 Bytes
Contents
# encoding: UTF-8 module ScriptEditorHelper # @param pars [Array] # @return [nil] def add_pars_to_controllers(pars) Dir["#{@app_structure.controllers_fld}/*"].each do |controller| content = load_file_text(controller) content.sub!(/CONFIG = \{[\s\w:',.\/\?=\-]*?\s\s}/) { |config| pars.each { |par| config.sub!(/CONFIG = \{\n/, "CONFIG = {\n\t\t\t#{par},\n") unless content[par] || content[par[/['"][\s\w:,.\/\?=\-]+?['"]/]] } config } create_file(controller, content) end end end
Version data entries
13 entries across 13 versions & 1 rubygems