Skip to content

Instantly share code, notes, and snippets.

@ThroughTheNet
Created October 12, 2011 13:14
Show Gist options
  • Save ThroughTheNet/1281199 to your computer and use it in GitHub Desktop.
Save ThroughTheNet/1281199 to your computer and use it in GitHub Desktop.
adding attribute and text with nokogiri builder
builder = Nokogiri::XML::Builder.new do
root {
item {
tag "some text", :attribute => 'value'
}
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment