class CogCmd::Swat::Reload
Cog Command that [re]loads a local git repo for scripts
Public Instance Methods
run_command()
click to toggle source
# File lib/cog_cmd/swat/reload.rb, line 11 def run_command git = ::Swat::Git.new git.wipe if wipe? result = { source: git.source, target: git.target, wiped: wipe? }.merge(git.update) response.content = result end
wipe?()
click to toggle source
# File lib/cog_cmd/swat/reload.rb, line 20 def wipe? request.options["wipe"] == true || request.options["wipe"] == "true" end