Module: Kernel

Defined in:
lib/openc3/core_ext/kernel.rb

Overview

OpenC3 specific additions to the Ruby Kernel module

Instance Method Summary collapse

Instance Method Details

#calling_method(start = 1) ⇒ Symbol



42
43
44
# File 'lib/openc3/core_ext/kernel.rb', line 42

def calling_method(start = 1)
  caller[start][/`([^']*)'/, 1].intern
end

#is_mac?Boolean



31
32
33
34
35
36
37
38
# File 'lib/openc3/core_ext/kernel.rb', line 31

def is_mac?
  _, platform, *_ = RUBY_PLATFORM.split("-")
  result = false
  if /darwin/.match?(platform)
    result = true
  end
  return result
end

#is_windows?Boolean



26
27
28
# File 'lib/openc3/core_ext/kernel.rb', line 26

def is_windows?
  Gem.win_platform?
end