Module: Filepath::ContentChanges

Extended by:
MethodDelegation
Included in:
Filepath
Defined in:
lib/filepath/filepath.rb

Instance Method Summary collapse

Instance Method Details

#append(content) ⇒ Object



896
897
898
899
900
# File 'lib/filepath/filepath.rb', line 896

def append(content)
	open('a') do |file|
		file.write(content)
	end
end

#truncate(*args) ⇒ Object



904
905
906
907
908
909
910
# File 'lib/filepath/filepath.rb', line 904

def truncate(*args)
	if args.empty?
		args << 0
	end

	file_truncate(*args)
end

#write(content) ⇒ Object



890
891
892
893
894
# File 'lib/filepath/filepath.rb', line 890

def write(content)
	open('w') do |file|
		file.write(content)
	end
end