Module: Morale::Platform

Included in:
ConnectionStore
Defined in:
lib/morale/platform.rb

Instance Method Summary collapse

Instance Method Details

#home_directoryObject



3
4
5
# File 'lib/morale/platform.rb', line 3

def home_directory
  running_on_windows? ? ENV['USERPROFILE'] : ENV['HOME']
end

#running_on_windows?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/morale/platform.rb', line 7

def running_on_windows?
  RUBY_PLATFORM =~ /mswin32|mingw32/
end