Class: Bake::Blocks::CommandLine
- Inherits:
-
Object
- Object
- Bake::Blocks::CommandLine
- Includes:
- HasExecuteCommand
- Defined in:
- lib/blocks/commandLine.rb
Instance Attribute Summary
Attributes included from HasExecuteCommand
Instance Method Summary collapse
- #clean ⇒ Object
- #cleanStep ⇒ Object
- #execute ⇒ Object
- #exitStep ⇒ Object
-
#initialize(config) ⇒ CommandLine
constructor
A new instance of CommandLine.
- #run ⇒ Object
- #startupStep ⇒ Object
Methods included from HasExecuteCommand
Constructor Details
#initialize(config) ⇒ CommandLine
Returns a new instance of CommandLine.
9 10 11 12 13 |
# File 'lib/blocks/commandLine.rb', line 9 def initialize(config) @config = config # Bake::Metamodel::CommandLine @commandLine = config.name.kind_of?(Array) ? config.name.join(' ') : config.name @projectDir = config.get_project_dir end |
Instance Method Details
#clean ⇒ Object
36 37 38 39 |
# File 'lib/blocks/commandLine.rb', line 36 def clean # nothing to do here return true end |
#cleanStep ⇒ Object
32 33 34 |
# File 'lib/blocks/commandLine.rb', line 32 def cleanStep return run() end |
#execute ⇒ Object
20 21 22 |
# File 'lib/blocks/commandLine.rb', line 20 def execute return run() end |
#exitStep ⇒ Object
28 29 30 |
# File 'lib/blocks/commandLine.rb', line 28 def exitStep return run() end |
#run ⇒ Object
15 16 17 18 |
# File 'lib/blocks/commandLine.rb', line 15 def run return true if Bake..linkOnly return executeCommand(@commandLine, nil, @config.validExitCodes, @config.echo) end |
#startupStep ⇒ Object
24 25 26 |
# File 'lib/blocks/commandLine.rb', line 24 def startupStep return run() end |