# File lib/stella/core_ext.rb, line 143 def to_file(filename, mode, chmod=0744) mode = (mode == :append) ? 'a' : 'w' f = File.open(filename,mode) f.puts self f.close raise "Provided chmod is not a Fixnum (#{chmod})" unless chmod.is_a?(Fixnum) File.chmod(chmod, filename) end