Class: Nbuild::NCacheCmd

Inherits:
Cmd
  • Object
show all
Defined in:
lib/nbuild/ncache_cmd.rb

Instance Method Summary collapse

Methods inherited from Cmd

#execute, #execute_in

Constructor Details

#initialize(params = {}) ⇒ NCacheCmd

Returns a new instance of NCacheCmd.



5
6
7
8
# File 'lib/nbuild/ncache_cmd.rb', line 5

def initialize params={}
  @path = ENV['NCACHE_HOME'] || 'C:\Program Files\NCache\bin\tools'
  @params = params
end

Instance Method Details

#commandObject



10
11
12
13
14
# File 'lib/nbuild/ncache_cmd.rb', line 10

def command
  cmd = @params[:stop] ? 'stopcache' : 'startcache'
  cache = @params[:cache]
  "\"#{@path}\\#{cmd}\" #{cache}"
end