Class: Henry::Environment

Inherits:
Object
  • Object
show all
Defined in:
lib/henry/environment.rb

Overview

Henry Environmet. To be used as proxy to access the Task execution params from the tests

Constant Summary collapse

EXPORT_FILE_PATH =

The path to the default file export directory

Returns:

  • (String)
"/output"

Class Method Summary collapse

Class Method Details

.export_file(path) ⇒ Object

Copies the file from the given path to the default export directory

Parameters:

  • path (String)

    the path of the file to be exported.



38
39
40
# File 'lib/henry/environment.rb', line 38

def self.export_file(path)
  FileUtils.copy_file(path, "#{EXPORT_FILE_PATH}/#{File.basename(path)}")
end

.loggerLogger

Gets the Task Logger instance vis DBr.

Returns:

  • (Logger)

    the Task Logger instance.



31
32
33
# File 'lib/henry/environment.rb', line 31

def self.logger
  return DRbObject.new_with_uri(LoggerService::DRB_URI)
end

.paramsHash

Imports and returs the Task execution parameters.

Returns:

  • (Hash)

    the Task execution parameters



24
25
26
# File 'lib/henry/environment.rb', line 24

def self.params
  @@params ||= Input.import!.params 
end