lib/core/facets/file/create.rb in facets-2.4.5 vs lib/core/facets/file/create.rb in facets-2.5.0
- old
+ new
@@ -6,10 +6,10 @@
# string is writ.
#
# str = 'The content for the file'
# File.create('myfile.txt', str)
#
- # CREDIT: George Moschovitis
+ # CREDIT: George Moschovitis
def self.create(path, str='', &blk)
open(path, 'wb') do |f|
f << str
blk.call(f) if blk