class WTF::Dumper::Output
Attributes
data[R]
Public Class Methods
new(data)
click to toggle source
# File lib/wtf/dumper.rb, line 114 def initialize(data) @data = data end
Public Instance Methods
call(meth)
click to toggle source
# File lib/wtf/dumper.rb, line 118 def call(meth) if block = WTF.output_options[meth] block.call(data) else send(meth) end end
Private Instance Methods
error()
click to toggle source
# File lib/wtf/dumper.rb, line 139 def error raise StandardError, data end
file()
click to toggle source
# File lib/wtf/dumper.rb, line 133 def file time = Time.now.strftime('%m%d_%H%M%S') file = File.join(WTF.files_path, "wtf_#{time}_#{rand(10000)}.txt") File.write(file, data) end
puts()
click to toggle source
# File lib/wtf/dumper.rb, line 128 def puts STDOUT.puts(data) end
Also aliased as: default