Have an array of single pair hashes, like this:
arguments = [{:name=>"ABCD"},{:title=>"Awesome"},{:number=>4}]
I need to loop through and pull each one off as a key and value. Right now, I'm doing this:
def methodname(*arguments, &block)
arguments.each do |arg|
arg.each do |key, value|
# use my key and value
end
end
# use the &block here in awesome ways
end
Ick. Gotta be a better way, so I'm asking if someone knows it. I've searched and can't seem to find this particular question on StackOverflow, but let me know if it's out there.
EDIT: Added context to the code example.