On 19 Jul 2010, at 11:37, Szymon Przybył wrote:
xml = File.read(path)
puts Benchmark.measure {
doc = Hpricot::XML(xml)
(doc/:score-partwise).each do |s|
# here we have s as each score-partwise block
end
}
But it throws undefined local variable or method `partwise' for
#<MusicxmlController:0xb6badff4>, becouse in symbols names minus sign
is prohibited. How can I make a symbol name with minus sign?
Just use a string instead:
(doc/'score-partwise')
Best regards
Peter De Berdt
--
You received this message because you are subscribed to the Google Groups "Ruby on
Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.