Class: CogCmd::Swat::Reload
- Inherits:
-
Cog::Command
- Object
- Cog::Command
- CogCmd::Swat::Reload
- Defined in:
- lib/cog_cmd/swat/reload.rb
Overview
Cog Command that [re]loads a local git repo for scripts
Instance Method Summary collapse
Instance Method Details
#run_command ⇒ Object
11 12 13 14 15 16 17 18 |
# 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? ⇒ Boolean
20 21 22 |
# File 'lib/cog_cmd/swat/reload.rb', line 20 def wipe? request.["wipe"] == true || request.["wipe"] == "true" end |