Module: EnvPaths
- Defined in:
- lib/env_paths.rb,
lib/env_paths/version.rb
Defined Under Namespace
Modules: Linux, MacOs, Windows
Classes: OSData
Constant Summary
collapse
- HOMEDIR =
Dir.home
- VERSION =
'1.0.0'.freeze
Class Method Summary
collapse
Class Method Details
50
51
52
|
# File 'lib/env_paths.rb', line 50
def self._platform
RUBY_PLATFORM
end
|
.get(app_name, opts = {}) ⇒ Object
54
55
56
57
58
59
60
61
62
63
64
65
|
# File 'lib/env_paths.rb', line 54
def self.get(app_name, opts = {})
suffix = opts.fetch(:suffix, 'ruby')
app_name += "-#{suffix}" unless opts[:suffix] == false
case _platform.downcase
when /win32/
Windows.config(app_name)
when /darwin/
MacOs.config(app_name)
else
Linux.config(app_name)
end
end
|