Class: Bake::Blocks::Docu

Inherits:
Object
  • Object
show all
Includes:
HasExecuteCommand
Defined in:
lib/blocks/docu.rb

Instance Attribute Summary

Attributes included from HasExecuteCommand

#config

Instance Method Summary collapse

Methods included from HasExecuteCommand

#executeCommand

Constructor Details

#initialize(config, tcs) ⇒ Docu

Returns a new instance of Docu.



8
9
10
11
12
# File 'lib/blocks/docu.rb', line 8

def initialize(config, tcs)
  @config = config # Bake::Metamodel::CommandLine
  @commandLine = tcs[:DOCU]
  @projectDir = config.get_project_dir
end

Instance Method Details

#cleanObject



23
24
25
26
# File 'lib/blocks/docu.rb', line 23

def clean
  # nothing to do here
  return true
end

#executeObject



14
15
16
17
18
19
20
21
# File 'lib/blocks/docu.rb', line 14

def execute
  if @commandLine.empty?
    Bake.formatter.printInfo("No documentation command specified", @config)
  else
    return executeCommand(@commandLine)
  end
  return true
end