Skip to content

Instantly share code, notes, and snippets.

@chrislo
Created May 20, 2011 10:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrislo/982716 to your computer and use it in GitHub Desktop.
Save chrislo/982716 to your computer and use it in GitHub Desktop.
Accessing a variable inside a nokogiri template
require 'sinatra'
require 'nokogiri'
get '/' do
@thing = 'thing'
nokogiri :index
end
__END__
@@ index
xml.test {
xml.something @thing
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment