Class: Heel::Logger

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filename) ⇒ Logger

Returns a new instance of Logger.



4
5
6
# File 'lib/heel/logger.rb', line 4

def initialize( filename )
  @filename = File.expand_path( filename )
end

Instance Attribute Details

#filenameObject (readonly)

Returns the value of attribute filename.



3
4
5
# File 'lib/heel/logger.rb', line 3

def filename
  @filename
end

Instance Method Details

#write(msg) ⇒ Object



8
9
10
11
12
# File 'lib/heel/logger.rb', line 8

def write( msg )
  File.open( filename, "ab" ) do |f|
    f.write( msg )
  end
end