Làm cách nào tôi có thể chuyển một số biến số args cho một sản lượng. Tôi không muốn vượt qua một mảng (như mã sau đây), tôi thực sự muốn vượt qua chúng như là một số lập trình của args cho khối.Làm thế nào tôi có thể lập trình chuyển args để sinh lời trong Ruby?
def each_with_attributes(attributes, &block)
results[:matches].each_with_index do |match, index|
yield self[index], attributes.collect { |attribute| (match[:attributes][attribute] || match[:attributes]["@#{attribute}"]) }
end
end