Files

RSCM::Platform

Public Class Methods

family() click to toggle source
# File lib/rscm/platform.rb, line 5
def family
  target_os = Config::CONFIG["target_os"] or ""
  return "powerpc-darwin" if target_os.downcase =~ /darwin/
  return "mswin32"  if target_os.downcase =~ /32/
  return "cygwin" if target_os.downcase =~ /cyg/
  return "freebsd" if target_os.downcase =~ /freebsd/
  raise "Unsupported OS: #{target_os}"
end
prompt(dir=Dir.pwd) click to toggle source
# File lib/rscm/platform.rb, line 20
def prompt(dir=Dir.pwd)
  prompt = "#{dir.gsub(/\//, File::SEPARATOR)} #{user}$"
end
user() click to toggle source
# File lib/rscm/platform.rb, line 15
def user
  family == "mswin32" ? ENV['USERNAME'] : ENV['USER']
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.