Is there a better way to format this code, to make it more readable?
footnotes_paragraph.xpath('./small').children.slice_before do |element|
element.name == 'br'
end.map do |element|
Footnote.new element
end.reject(:empty?)
Is there a better way to format this code, to make it more readable?
|
|||
|
You could extract out the initial xquery part into a separate method
Instead of using
|
|||||||||||||
|