Class: Docu

Inherits:
Object
  • Object
show all
Includes:
Albacore::RunCommand, Albacore::Task, Configuration::Docu
Defined in:
lib/albacore/docu.rb

Instance Attribute Summary collapse

Attributes included from Albacore::RunCommand

#command, #working_directory

Attributes included from Logging

#current_log_device, #logger

Instance Method Summary collapse

Methods included from Configuration::Docu

#docu, docuconfig, included

Methods included from Albacore::Configuration

included

Methods included from Albacore::RunCommand

#get_command, #run_command

Methods included from AttrMethods

#attr_array, #attr_hash

Methods included from Albacore::Task

clean_dirname, create_rake_task, include_config, included

Methods included from UpdateAttributes

#<<, #update_attributes

Methods included from YAMLConfig

#configure, #load_config_by_task_name

Methods included from Logging

#create_logger, #log_device=, #log_level, #log_level=

Methods included from Failure

#fail_with_message

Constructor Details

#initialize(command = nil) ⇒ Docu

Returns a new instance of Docu.



12
13
14
15
16
17
18
19
# File 'lib/albacore/docu.rb', line 12

def initialize(command=nil)
  @assemblies = []
  @xml_files = []
  @output_location = ""
  super()
  update_attributes docu.to_hash
  @command = command unless command.nil?
end

Instance Attribute Details

#output_locationObject

Returns the value of attribute output_location.



9
10
11
# File 'lib/albacore/docu.rb', line 9

def output_location
  @output_location
end

Instance Method Details

#executeObject



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/albacore/docu.rb', line 21

def execute
  if @assemblies.empty?
    fail_with_message 'Docu Failed. No assemblies specified'
    return
  end

  command_params = get_command_parameters
  success = run_command 'Docu', command_params.join(' ')

  fail_with_message 'Docu Failed. See Build Log For Detail' unless success
end