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
-
.configuration ⇒ Object
Returns the value of attribute configuration.
Class Method Summary collapse
- .configure {|configuration| ... } ⇒ Object
- .files ⇒ Object
- .gem_path ⇒ Object
- .home ⇒ Object
- .host ⇒ Object
- .ldap_pass ⇒ Object
- .ldap_user ⇒ Object
- .pwd ⇒ Object
- .root ⇒ Object
- .user ⇒ Object
Class Attribute Details
.configuration ⇒ Object
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
32 33 34 35 |
# File 'lib/tools.rb', line 32 def configure self.configuration ||= Configuration.new yield(configuration) end |
.files ⇒ Object
42 43 44 |
# File 'lib/tools.rb', line 42 def self.files File.join root, 'lib/files' end |
.gem_path ⇒ Object
70 71 72 |
# File 'lib/tools.rb', line 70 def self.gem_path ENV['GEM_PATH'] end |
.home ⇒ Object
50 51 52 |
# File 'lib/tools.rb', line 50 def self.home ENV['HOME'] end |
.host ⇒ Object
46 47 48 |
# File 'lib/tools.rb', line 46 def self.host Socket.gethostname end |
.ldap_pass ⇒ Object
62 63 64 |
# File 'lib/tools.rb', line 62 def self.ldap_pass ENV['ldap_pass'] end |
.ldap_user ⇒ Object
66 67 68 |
# File 'lib/tools.rb', line 66 def self.ldap_user ENV['ldap_user'] end |
.pwd ⇒ Object
58 59 60 |
# File 'lib/tools.rb', line 58 def self.pwd ENV['PWD'] end |
.user ⇒ Object
54 55 56 |
# File 'lib/tools.rb', line 54 def self.user ENV['USER'] end |