Module: Printer
Instance Method Summary collapse
Instance Method Details
#print(f = nil, &block) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/germ/printer.rb', line 8 def print f=nil, &block if f write f, &block else output STDOUT, &block end end |
#write(file, &block) ⇒ Object
2 3 4 5 6 |
# File 'lib/germ/printer.rb', line 2 def write file, &block File.open(file,"w") do |f| output f, &block end end |