Module: Tesler::Config

Defined in:
lib/tesler/config.rb

Overview

This module contains all the configuration variables used by tesler

Class Method Summary collapse

Class Method Details

.operatorObject

get the module which performs the copy operations



26
27
28
# File 'lib/tesler/config.rb', line 26

def self.operator
  @operator ||= Tesler::Operators::Run
end

.operator=(op) ⇒ Object

define the module which performs the copy operations



31
32
33
# File 'lib/tesler/config.rb', line 31

def self.operator=(op)
  @operator = op
end

.outputObject

Get the standard output. The output is an object who must respond to the ‘puts’ method. By default it is set to STDOUT



6
7
8
# File 'lib/tesler/config.rb', line 6

def self.output
  @output ||= STDOUT
end

.output=(output) ⇒ Object

Set the standard output.



11
12
13
# File 'lib/tesler/config.rb', line 11

def self.output=(output)
  @output = output
end

.resetObject

Reinitializes the configuration



36
37
38
39
40
# File 'lib/tesler/config.rb', line 36

def self.reset
  @output = nil
  @source_directory = nil
  @operator = nil
end

.source_directoryObject

Get the source directory. It is the directory where all the files that we are copying , are taken from.



16
17
18
# File 'lib/tesler/config.rb', line 16

def self.source_directory
  @source_directory ||= ''
end

.source_directory=(directory_name) ⇒ Object

Set the source directory



21
22
23
# File 'lib/tesler/config.rb', line 21

def self.source_directory=(directory_name)
  @source_directory = directory_name.tesler
end