Module: ArubaDoubles

Defined in:
lib/aruba-doubles.rb,
lib/aruba-doubles/double.rb,
lib/aruba-doubles/history.rb

Defined Under Namespace

Classes: Double, History

Constant Summary collapse

HISTORY_FILE =

Basename of the history file

'history.pstore'

Instance Method Summary collapse

Instance Method Details

#double_cmd(cmd, output = {}) ⇒ Object



12
13
14
15
16
17
# File 'lib/aruba-doubles.rb', line 12

def double_cmd(cmd, output = {})
  argv = cmd.shellsplit
  filename = argv.shift
  double = Double.find(filename) || Double.new(filename)
  double.create { on argv, output }
end

#historyObject



19
20
21
# File 'lib/aruba-doubles.rb', line 19

def history
  @history ||= History.new(File.join(Double.bindir, HISTORY_FILE))
end