Class: Bwgem::Writer
- Inherits:
-
Object
- Object
- Bwgem::Writer
- Defined in:
- lib/write_file.rb
Instance Method Summary collapse
-
#initialize(write_file_path, content) ⇒ Writer
constructor
A new instance of Writer.
Constructor Details
#initialize(write_file_path, content) ⇒ Writer
Returns a new instance of Writer.
3 4 5 |
# File 'lib/write_file.rb', line 3 def initialize(write_file_path, content) File.open(write_file_path, "w+") { |f| f.write(content) } end |