Class: File
- Inherits:
-
Object
- Object
- File
- Defined in:
- lib/mark_facets/ruby/file.rb
Class Method Summary collapse
Class Method Details
.update(file_path) {|file| ... } ⇒ Object
5 6 7 8 9 |
# File 'lib/mark_facets/ruby/file.rb', line 5 def update(file_path) file = File.read(file_path) yield file File.open(file_path, 'w') {|f| f.write(file)} end |