[ create a new paste ] login | about

Link: http://codepad.org/56apf5Fz    [ raw code | output | fork ]

Ruby, pasted on Apr 12:
1
2
3
4
5
6
7
8
9
10
require 'erb'

html_erb = ""
('A' .. 'G').to_a.each do |col|
  puts col

  html_erb << 'yo <%= blabla(col) %>'
end

puts ERB.new(html_erb).result


Output:
1
2
3
4
5
6
7
8
(erb):1: undefined local variable or method `col' for main:Object (NameError)
A
B
C
D
E
F
G


Create a new paste based on this one


Comments: