Class: Goodall::Writer

Inherits:
Object
  • Object
show all
Defined in:
lib/goodall/writer.rb

Instance Method Summary collapse

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

#closeObject



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