Module: Tools

Defined in:
lib/tools.rb,
lib/tools/version.rb

Defined Under Namespace

Classes: Configuration

Constant Summary collapse

VERSION =
'1.2.0'.freeze
HOMEPAGE =
'https://github.com/Xyko/tools'.freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject

Returns the value of attribute configuration.



30
31
32
# File 'lib/tools.rb', line 30

def configuration
  @configuration
end

Class Method Details

.configure {|configuration| ... } ⇒ Object

Yields:



32
33
34
35
# File 'lib/tools.rb', line 32

def configure
  self.configuration ||= Configuration.new
  yield(configuration)
end

.filesObject



42
43
44
# File 'lib/tools.rb', line 42

def self.files
  File.join root, 'lib/files'
end

.gem_pathObject



70
71
72
# File 'lib/tools.rb', line 70

def self.gem_path
  ENV['GEM_PATH']
end

.homeObject



50
51
52
# File 'lib/tools.rb', line 50

def self.home
  ENV['HOME']
end

.hostObject



46
47
48
# File 'lib/tools.rb', line 46

def self.host
  Socket.gethostname
end

.ldap_passObject



62
63
64
# File 'lib/tools.rb', line 62

def self.ldap_pass
  ENV['ldap_pass']
end

.ldap_userObject



66
67
68
# File 'lib/tools.rb', line 66

def self.ldap_user
  ENV['ldap_user']
end

.pwdObject



58
59
60
# File 'lib/tools.rb', line 58

def self.pwd
  ENV['PWD']
end

.rootObject



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

def self.root
  File.dirname __dir__
end

.userObject



54
55
56
# File 'lib/tools.rb', line 54

def self.user
  ENV['USER']
end