Class: Goodall::Writer
- Inherits:
-
Object
- Object
- Goodall::Writer
- Defined in:
- lib/goodall/writer.rb
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(file_path) ⇒ Writer
constructor
A new instance of Writer.
- #write(str) ⇒ Object
Constructor Details
#initialize(file_path) ⇒ Writer
Returns a new instance of Writer.
3 4 5 |
# File 'lib/goodall/writer.rb', line 3 def initialize(file_path) @documentation_file = File.new(file_path, "w") end |
Instance Method Details
#close ⇒ Object
7 8 9 |
# File 'lib/goodall/writer.rb', line 7 def close @documentation_file.close end |
#write(str) ⇒ Object
11 12 13 |
# File 'lib/goodall/writer.rb', line 11 def write(str) @documentation_file.puts str end |