Module: UtilityPack::CoreExtensions::File::ClassMethods
- Included in:
- File
- Defined in:
- lib/utility_pack/core_ext/file.rb
Instance Method Summary collapse
Instance Method Details
#read_file(path) ⇒ Object
10 11 12 |
# File 'lib/utility_pack/core_ext/file.rb', line 10 def read_file(path) ::File.open(path, 'r') {|f| f.read } end |
#write_file(path, s) ⇒ Object
14 15 16 |
# File 'lib/utility_pack/core_ext/file.rb', line 14 def write_file(path, s) ::File.open(path, 'w') {|f| f.write(s) } end |