class MiGA::MiGA

Generic class used to handle system-wide information and methods, and parent of all other MiGA::* classes.

Public Class Methods

CITATION() click to toggle source

Reference of MiGA.

# File lib/miga/version.rb, line 56
def self.CITATION ; CITATION ; end
DEBUG(*args) click to toggle source

Send debug message.

# File lib/miga/common/base.rb, line 29
def DEBUG(*args)
  $stderr.puts(*args) if @@DEBUG
  $stderr.puts(
        caller.map{ |v| v.gsub(/^/,'     ') }.join("\n") ) if @@DEBUG_TRACE
end
DEBUG_OFF() click to toggle source

Turn off debugging.

# File lib/miga/common/base.rb, line 12
def DEBUG_OFF ; @@DEBUG=false end
DEBUG_ON() click to toggle source

Turn on debugging.

# File lib/miga/common/base.rb, line 8
def DEBUG_ON ; @@DEBUG=true end
DEBUG_TRACE_OFF() click to toggle source

Turn off debug tracing (but not debugging).

# File lib/miga/common/base.rb, line 23
def DEBUG_TRACE_OFF
  @@DEBUG_TRACE=false
end
DEBUG_TRACE_ON() click to toggle source

Turn on debug tracing (and debugging).

# File lib/miga/common/base.rb, line 16
def DEBUG_TRACE_ON
  @@DEBUG_TRACE=true
  DEBUG_ON()
end
FULL_VERSION() click to toggle source

Complete version as string.

# File lib/miga/version.rb, line 42
def self.FULL_VERSION ; VERSION.join(".") ; end
LONG_VERSION() click to toggle source

Complete version with nickname and date as string.

# File lib/miga/version.rb, line 46
def self.LONG_VERSION
  "MiGA #{VERSION.join(".")} - #{VERSION_NAME} - #{VERSION_DATE}"
end
VERSION() click to toggle source

Major.minor version as Float.

# File lib/miga/version.rb, line 38
def self.VERSION ; VERSION[0] ; end
VERSION_DATE() click to toggle source

Date of the current gem release.

# File lib/miga/version.rb, line 52
def self.VERSION_DATE ; VERSION_DATE ; end
initialized?() click to toggle source

Has MiGA been initialized?

# File lib/miga/common.rb, line 24
def self.initialized?
  File.exist?(File.expand_path('.miga_rc', ENV['MIGA_HOME'])) and
    File.exist?(File.expand_path('.miga_daemon.json', ENV['MIGA_HOME']))
end

Public Instance Methods

result_files_exist?(base, ext) click to toggle source

Check if the result files exist with base name (String) followed by the ext values (Array of String).

# File lib/miga/common.rb, line 32
def result_files_exist?(base, ext)
  ext = [ext] unless ext.is_a? Array
  ext.all? do |f|
    File.exist?(base + f) or File.exist?("#{base}#{f}.gz")
  end
end