Class: HistWatch

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

Overview

HistWatch is a wrapper class for starting EM and loading configuration information for History Commander

Class Method Summary collapse

Class Method Details

.start(mode = "full", file = File.join(File.expand_path('~'), ".bash_history")) ⇒ Object

starts



79
80
81
# File 'lib/history_commander.rb', line 79

def self.start(mode="full", file = File.join(File.expand_path('~'), ".bash_history"))
  @hist_file_watch = EventMachine::file_tail(file, HistoryCommander, -1, mode)
end

.stopObject



83
84
85
# File 'lib/history_commander.rb', line 83

def self.stop
  EM.stop
end