Class: OodAppkit::Servers::Torque

Inherits:
OodAppkit::Server show all
Defined in:
lib/ood_appkit/servers/torque.rb

Overview

This defines a Torque server / client software installation

Instance Attribute Summary collapse

Attributes inherited from OodAppkit::Server

#host

Instance Method Summary collapse

Constructor Details

#initialize(prefix:, version:, **kwargs) ⇒ Torque

Returns a new instance of Torque.

Parameters:

  • prefix (String)

    installation path of client software

  • version (String)

    version of client software

Raises:

  • (ArgumentError)


15
16
17
18
19
20
21
22
23
24
25
# File 'lib/ood_appkit/servers/torque.rb', line 15

def initialize(prefix:, version:, **kwargs)
  super(kwargs)

  # installation path
  @prefix = Pathname.new prefix
  raise ArgumentError, "prefix path doesn't exist (#{@prefix})" unless @prefix.exist?
  raise ArgumentError, "prefix not valid directory (#{@prefix})" unless @prefix.directory?

  # version number
  @version = version
end

Instance Attribute Details

#prefixPathname (readonly)

The path to the installation location for this software

Returns:

  • (Pathname)

    the path to software installation location



7
8
9
# File 'lib/ood_appkit/servers/torque.rb', line 7

def prefix
  @prefix
end

#versionString (readonly)

The version of this software

Returns:

  • (String)

    version of software



11
12
13
# File 'lib/ood_appkit/servers/torque.rb', line 11

def version
  @version
end

Instance Method Details

#binPathname

The path to Torque software binaries

Examples:

Locally installed Torque v5.1.1

"my_software.lib" #=> "/usr/local/torque/5.1.1/bin"

Returns:

  • (Pathname)

    path to binaries



39
40
41
# File 'lib/ood_appkit/servers/torque.rb', line 39

def bin
  prefix.join('bin')
end

#libPathname

The path to Torque software library

Examples:

Locally installed Torque v5.1.1

"my_software.lib" #=> "/usr/local/torque/5.1.1/lib"

Returns:

  • (Pathname)

    path to libraries



31
32
33
# File 'lib/ood_appkit/servers/torque.rb', line 31

def lib
  prefix.join('lib')
end