Module: Tools
- Defined in:
- lib/tools.rb,
lib/tools/version.rb
Defined Under Namespace
Classes: Configuration
Constant Summary collapse
- VERSION =
"0.4.3"- HOMEPAGE =
"https://github.com/Xyko/tools"- @@check_version =
nil
Class Attribute Summary collapse
-
.configuration ⇒ Object
Returns the value of attribute configuration.
Class Method Summary collapse
- .configure {|configuration| ... } ⇒ Object
- .files ⇒ Object
- .gem_path ⇒ Object
- .get_check_version ⇒ Object
- .home ⇒ Object
- .host ⇒ Object
- .ldap_pass ⇒ Object
- .ldap_user ⇒ Object
- .pwd ⇒ Object
- .root ⇒ Object
- .set_check_version(param) ⇒ Object
- .user ⇒ Object
Class Attribute Details
.configuration ⇒ Object
Returns the value of attribute configuration.
36 37 38 |
# File 'lib/tools.rb', line 36 def configuration @configuration end |
Class Method Details
.configure {|configuration| ... } ⇒ Object
38 39 40 41 |
# File 'lib/tools.rb', line 38 def configure self.configuration ||= Configuration.new yield(configuration) end |
.files ⇒ Object
50 51 52 |
# File 'lib/tools.rb', line 50 def self.files File.join root, 'lib/files' end |
.gem_path ⇒ Object
78 79 80 |
# File 'lib/tools.rb', line 78 def self.gem_path ENV['GEM_PATH'] end |
.get_check_version ⇒ Object
27 28 29 |
# File 'lib/tools.rb', line 27 def self.get_check_version return @@check_version end |
.home ⇒ Object
58 59 60 |
# File 'lib/tools.rb', line 58 def self.home ENV['HOME'] end |
.host ⇒ Object
54 55 56 |
# File 'lib/tools.rb', line 54 def self.host Socket.gethostname end |
.ldap_pass ⇒ Object
70 71 72 |
# File 'lib/tools.rb', line 70 def self.ldap_pass ENV['ldap_pass'] end |
.ldap_user ⇒ Object
74 75 76 |
# File 'lib/tools.rb', line 74 def self.ldap_user ENV['ldap_user'] end |
.pwd ⇒ Object
66 67 68 |
# File 'lib/tools.rb', line 66 def self.pwd ENV['PWD'] end |
.root ⇒ Object
46 47 48 |
# File 'lib/tools.rb', line 46 def self.root File.dirname __dir__ end |
.set_check_version(param) ⇒ Object
23 24 25 |
# File 'lib/tools.rb', line 23 def self.set_check_version param @@check_version = param end |
.user ⇒ Object
62 63 64 |
# File 'lib/tools.rb', line 62 def self.user ENV['USER'] end |