Class: Validb::Logger::FileSystem

Inherits:
Object
  • Object
show all
Defined in:
lib/validb/logger/file_system.rb

Instance Method Summary collapse

Instance Method Details

#out(message) ⇒ Object



10
11
12
13
14
# File 'lib/validb/logger/file_system.rb', line 10

def out(message)
  File.open(filename, "ab+") do |file|
    file.puts(message)
  end
end

#prepareObject



4
5
6
7
8
# File 'lib/validb/logger/file_system.rb', line 4

def prepare
  File.delete(filename) if File.exists?(filename)
  File.open(filename, "w") {}
  $stdout.puts("Writing output to #{filename}")
end