Class: Configural::LinuxPlatform

Inherits:
Platform
  • Object
show all
Defined in:
lib/configural/platform.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Platform

get_platform, inherited, #initialize

Constructor Details

This class inherits a constructor from Configural::Platform

Class Method Details

.match?(app) ⇒ Boolean

Returns:

  • (Boolean)


74
75
76
# File 'lib/configural/platform.rb', line 74

def self.match?( app )
  true if /linux/ =~ RbConfig::CONFIG['host_os']
end

Instance Method Details

#cache_pathObject



78
79
80
# File 'lib/configural/platform.rb', line 78

def cache_path
  File.join( ENV['HOME'], '.cache', @app.name )
end

#config_pathObject



82
83
84
# File 'lib/configural/platform.rb', line 82

def config_path
  File.join( ENV['HOME'], '.config', @app.name )
end

#data_pathObject



86
87
88
# File 'lib/configural/platform.rb', line 86

def data_path
  File.join( ENV['HOME'], '.local', 'share', @app.name )
end