Mistři v programování na #hovnokod

Ruby #271

def properties_file2hash(_property_file, _link_hash=nil)
    r_hash = Hash.new
    if _property_file &&  FileTest::exist?(_property_file)
      f = File::open(_property_file,'r')
      begin
        _lines = f.readlines
        _lines.each{|_line|
          _strip_line = _line.strip
          if (_strip_line.length > 0)&&(_strip_line[0,1]!='#')
            var_plat = _line.split('::')
            if var_plat.length > 1
              if (RUBY_PLATFORM.include?(var_plat[0]))
                _line = var_plat[1]
                var_plat[2..-1].collect{|x| _line=_line+'::'+x} if var_plat.length > 2
              else
                _line = ''
              end
            end
            var = _line.split('=')
            if var.length > 1
              _value = var[1].strip
              var[2..-1].collect{|x| _value=_value+'='+x} if var.length > 2
              if _link_hash 
                _value = resolve_link(_value, _link_hash)
              end
              r_hash[var[0].strip]=_value
            end
          end
        }
      ensure
        f.close unless f.nil?
      end
      return r_hash      
    end

HovnoKod,