Class: Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/aniview/util/logger.rb

Instance Method Summary collapse

Constructor Details

#initialize(file) ⇒ Logger

Returns a new instance of Logger.



2
3
4
5
# File 'lib/aniview/util/logger.rb', line 2

def initialize(file)
	@logfile = file
	open(@logfile, 'w') { |f| f.puts "initialized..." }
end

Instance Method Details

#log(string) ⇒ Object



6
7
8
# File 'lib/aniview/util/logger.rb', line 6

def log(string)
	open(@logfile, 'a') { |f| f.puts string }
end