Class: Airake::Commands::Adl

Inherits:
Base show all
Defined in:
lib/airake/commands/adl.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#assert_not_blank, #assert_required, #escape, #include_classes, #library_paths, #process, #relative_path, #source_paths, #windows?, #with_options

Constructor Details

#initialize(options = {}) ⇒ Adl

Create ADL command.

Options

adl_path

Path to adl, defaults to ‘adl’

appxml_path

Path to application descriptor xml (required)

base_dir

Path to base project directory (required)

adl_extra_opts

Extra options for command line



20
21
22
23
24
25
26
# File 'lib/airake/commands/adl.rb', line 20

def initialize(options = {})
  assert_required(options, [ :appxml_path, :base_dir ])
  with_options(options, { :adl_path => "adl" })
  
  # For full path
  @appxml_path = File.expand_path(@appxml_path)
end

Instance Attribute Details

#adl_extra_optsObject (readonly)

Returns the value of attribute adl_extra_opts.



10
11
12
# File 'lib/airake/commands/adl.rb', line 10

def adl_extra_opts
  @adl_extra_opts
end

#adl_pathObject (readonly)

Returns the value of attribute adl_path.



10
11
12
# File 'lib/airake/commands/adl.rb', line 10

def adl_path
  @adl_path
end

#appxml_pathObject (readonly)

Returns the value of attribute appxml_path.



10
11
12
# File 'lib/airake/commands/adl.rb', line 10

def appxml_path
  @appxml_path
end

#base_dirObject (readonly)

Returns the value of attribute base_dir.



10
11
12
# File 'lib/airake/commands/adl.rb', line 10

def base_dir
  @base_dir
end

Instance Method Details

#launchObject

Get the ADL launch command



29
30
31
32
33
34
35
36
# File 'lib/airake/commands/adl.rb', line 29

def launch
  command = []
  command << @adl_path
  command << @adl_extra_opts
  command << escape(@appxml_path)
  command << escape(@base_dir)
  process(command)
end