range_array = (0..100).to_a
range_array.each do |number|
p %-<div class="#{number}"><h1>Dell Shitbox</h1></div>-
end
Result:
"<div class=\"83\"><h1>Dell Shitbox</h1></div>"
Desired result:
<div class="83"><h1>Dell Shitbox</h1></div>
I have tried escaping:
range_array = (0..100).to_a
range_array.each do |class|
p %-<div class=\"#{class}\"><h1>Dell Shitbox</h1></div>-
end
I have tried switching the quoting method (many, many times)
range_array = (0..100).to_a
range_array.each do |class|
p %Q[<div class="#{class}"><h1>Dell Shitbox</h1></div>]
end
Suggestions?