Class: File

Inherits:
Object
  • Object
show all
Defined in:
lib/file-append.rb

Class Method Summary collapse

Class Method Details

.append(name, string, open_args = nil) ⇒ Object



2
3
4
5
6
# File 'lib/file-append.rb', line 2

def File.append(name, string, open_args = nil)
  File.open(name, 'a', open_args) do |f|
    f.write(string)
  end
end