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

#commandObject

Deprecated.

Use #inspect instead



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

def command
  Kernel.warn '[DEPRECATION] `RidgepoleRake::Command#command` is deprecated and will be removed'
  inspect
end

#executeObject



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

def execute
  Kernel.system(*stash)
end

#inspectObject



23
24
25
# File 'lib/ridgepole_rake/command.rb', line 23

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