module Ramaze::View::Tagz::Methods
A host of methods useful inside the context of a view including print style methods that output content rather that printing to $stdout.
Private Instance Methods
<<(s)
click to toggle source
# File lib/ramaze/view/tagz.rb, line 25 def <<(s) tagz << s; self end
__(*a)
click to toggle source
# File lib/ramaze/view/tagz.rb, line 61 def __(*a) concat eol end
concat(*a)
click to toggle source
# File lib/ramaze/view/tagz.rb, line 29 def concat(*a) a.each{|s| tagz << s}; self end
eol()
click to toggle source
# File lib/ramaze/view/tagz.rb, line 53 def eol if response.content_type =~ %r|text/plain|io "\n" else "<br />" end end
p(*a)
click to toggle source
# File lib/ramaze/view/tagz.rb, line 41 def p(*a) a.each do |elem| tagz << "#{ Rack::Utils.escape_html elem.inspect }#{ eol }" end end
pp(*a)
click to toggle source
# File lib/ramaze/view/tagz.rb, line 47 def pp(*a) a.each do |elem| tagz << "#{ Rack::Utils.escape_html PP.pp(elem, '') }#{ eol }" end end
print(*a)
click to toggle source
# File lib/ramaze/view/tagz.rb, line 37 def print(*a) a.each{|elem| tagz << elem} end
puts(*a)
click to toggle source
# File lib/ramaze/view/tagz.rb, line 33 def puts(*a) a.each{|elem| tagz << "#{ elem.to_s.chomp }#{ eol }"} end