Method: StringInFile.write
- Defined in:
- lib/string_in_file.rb
.write(str_to_write, path) ⇒ Object
Writes the value of a string into a file
15 16 17 |
# File 'lib/string_in_file.rb', line 15 def self.write(str_to_write, path) File.open(path, 'w') { |f| f.write(str_to_write) } end |