class OodCluster::Servers::Moab

This class defines a Moab server / client software installation

Attributes

bin[R]

The path to the installation location for this software's binaries @example Locally installed Moab 8.1.1

my_software.bin.to_s #=> "/usr/local/moab/8.1.1/bin"

@return [Pathname] the path to software binaries

lib[R]

The path to the installation location for this software's libraries @example Locally installed Moab 8.1.1

my_software.lib.to_s #=> "/usr/local/moab/8.1.1/lib"

@return [Pathname] the path to software libraries

moabhomedir[R]

The required Moab environment variable @example

my_software.moabhomedir #=> "/var/spool/batch/moab"

@return [Pathname] necessary environment variable

version[R]

The version of this software @return [String] version of software

Public Class Methods

new(lib: "", bin: "", version:, moabhomedir: ENV['MOABHOMEDIR'], **kwargs) click to toggle source

@param (see Server#initialize) @param lib [#to_s] installation path of client software libraries @param bin [#to_s] installation path of client software binaries @param version [#to_s] version of client software @param moabhomedir [#to_s] necessary environment variable

Calls superclass method OodCluster::Server::new
# File lib/ood_cluster/servers/moab.rb, line 32
def initialize(lib: "", bin: "", version:, moabhomedir: ENV['MOABHOMEDIR'], **kwargs)
  super(kwargs)

  # installation path
  @lib = Pathname.new(lib.to_s)
  @bin = Pathname.new(bin.to_s)

  # version number
  @version = version.to_s

  # necessary moab environment variable
  @moabhomedir = Pathname.new(moabhomedir.to_s)
end

Public Instance Methods

to_h() click to toggle source

Convert object to hash @return [Hash] the hash describing this object

Calls superclass method OodCluster::Server#to_h
# File lib/ood_cluster/servers/moab.rb, line 48
def to_h
  super.merge lib: @lib, bin: @bin, version: @version, moabhomedir: @moabhomedir
end