Method: #parse_tclConfig
- Defined in:
- ext/extconf.rb
#parse_tclConfig(file) ⇒ Object
67 68 69 70 71 72 73 74 75 76 77 |
# File 'ext/extconf.rb', line 67 def parse_tclConfig(file) # check tclConfig.sh/tkConfig.sh tbl = {} IO.foreach(file){|line| line.strip! next if line !~ /^([^\#=][^=]*)=(['"]|)(.*)\2$/ key, val = $1, $3 tbl[key] = val.gsub(/\$\{([^}]+)\}/){|s| tbl[$1]} rescue nil } tbl end |