new(options, where)
public
Creates a new
instance that will write to where. If where is a String, output will be written to the File with
that name, otherwise where is exected to be an IO (or an object
that responds to #puts and #write).
Show source
def initialize(options, where)
super
if where.is_a?(String)
FileUtils.mkdir_p(File.dirname(where))
@output = File.open(where, 'w')
else
@output = where
end
@pending_examples = []
end