# File femto.rb, line 131 def initialize() @assets = Hash.new asset_re = Regexp.new('^\[([^\]]+)\]\s*((:\w+ *)+)?'); current_asset = "unknown" while (line = DATA.gets) do if line =~ /^\[endassets\]$/ break end if asset_re.match( line ) current_asset = $1 @assets[current_asset] = "" next end line = line.sub("%%%URL%%%", $URL) @assets[current_asset] += line end end