Class: EasySync::SyncLogger

Inherits:
Object
  • Object
show all
Defined in:
lib/easy_sync/sync_logger.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ SyncLogger

Returns a new instance of SyncLogger.



9
10
11
# File 'lib/easy_sync/sync_logger.rb', line 9

def initialize(path)
  @log = Logger.new(path)
end

Instance Attribute Details

#logObject (readonly)

Returns the value of attribute log.



7
8
9
# File 'lib/easy_sync/sync_logger.rb', line 7

def log
  @log
end

Instance Method Details

#info(message) ⇒ Object



13
14
15
16
# File 'lib/easy_sync/sync_logger.rb', line 13

def info(message)
  puts message
  log.info message
end