Class: RidgepoleRake::Command

Inherits:
Object
  • Object
show all
Includes:
Brancher::Command, Bundler::Command
Defined in:
lib/ridgepole_rake/command.rb

Instance Method Summary collapse

Constructor Details

#initialize(action, config, options = {}) ⇒ Command

Returns a new instance of Command.



4
5
6
7
8
9
10
11
# File 'lib/ridgepole_rake/command.rb', line 4

def initialize(action, config, options = {})
  @stash   = []
  @action  = action
  @config  = config
  @options = options

  build
end

Instance Method Details

#executeObject



13
14
15
# File 'lib/ridgepole_rake/command.rb', line 13

def execute
  Kernel.system(*stash)
end

#inspectObject



17
18
19
# File 'lib/ridgepole_rake/command.rb', line 17

def inspect
  stash.join(' ').strip
end