Class: Platform

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

Class Method Summary collapse

Class Method Details

.get_shell_kcodeObject



9
10
11
12
13
14
15
# File 'lib/tidtools/platform.rb', line 9

def self.get_shell_kcode
  if windows_os?
    Kconv::SJIS
  else
    Kconv::UTF8
  end
end

.ruby19?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/tidtools/platform.rb', line 17

def self.ruby19?
  RUBY_VERSION >= '1.9.0'
end

.windows_os?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/tidtools/platform.rb', line 5

def self.windows_os?
  RUBY_PLATFORM =~ /mswin(?!ce)|mingw|cygwin|bccwin/
end