Module: Avm::EacRubyBase0::Sources::Base::Executable

Defined in:
lib/avm/eac_ruby_base0/sources/base/executable.rb

Constant Summary collapse

EXECUTABLE_NAME_KEY =
'executable.name'
EXECUTABLE_DIRECTORY_KEY =
'executable.directory'
DEFAULT_EXECUTABLE_DIRECTORY =
'exe'

Instance Method Summary collapse

Instance Method Details

#default_executable_directoryString

Returns:

  • (String)


21
22
23
# File 'lib/avm/eac_ruby_base0/sources/base/executable.rb', line 21

def default_executable_directory
  DEFAULT_EXECUTABLE_DIRECTORY
end

#default_executable_nameString

Returns:

  • (String)


16
17
18
# File 'lib/avm/eac_ruby_base0/sources/base/executable.rb', line 16

def default_executable_name
  application.id
end

#executable_directoryString

Returns:

  • (String)


26
27
28
# File 'lib/avm/eac_ruby_base0/sources/base/executable.rb', line 26

def executable_directory
  executable_directory_by_configuration || default_executable_directory
end

#executable_directory_by_configurationString?

Returns:

  • (String, nil)


31
32
33
# File 'lib/avm/eac_ruby_base0/sources/base/executable.rb', line 31

def executable_directory_by_configuration
  configuration.entry(EXECUTABLE_DIRECTORY_KEY).value
end

#executable_nameString

Returns:

  • (String)


36
37
38
# File 'lib/avm/eac_ruby_base0/sources/base/executable.rb', line 36

def executable_name
  executable_name_by_configuration || default_executable_name
end

#executable_name_by_configurationString?

Returns:

  • (String, nil)


41
42
43
# File 'lib/avm/eac_ruby_base0/sources/base/executable.rb', line 41

def executable_name_by_configuration
  configuration.entry(EXECUTABLE_NAME_KEY).value
end

#executable_pathPathname

Executable’s absolute path.

Returns:

  • (Pathname)


48
49
50
# File 'lib/avm/eac_ruby_base0/sources/base/executable.rb', line 48

def executable_path
  path.join(executable_subpath)
end

#executable_subpathPathname

Executable’s relative path from source’s root.

Returns:

  • (Pathname)


55
56
57
# File 'lib/avm/eac_ruby_base0/sources/base/executable.rb', line 55

def executable_subpath
  executable_directory.to_pathname.join(executable_name)
end