System
The System module provides Platform and Ruby system information. The module should also be able to stand in for rbconfig. It is intended for use as a service module although it can be mixed-in too.
- argf
- argv
- child_status
- coding
- coding=
- current_platform
- data
- debug
- default_input
- default_output
- default_output=
- defin
- defout
- defout=
- env
- environment
- error_info
- error_position
- exit_status
- extentions
- fs
- fs=
- input_field_separator
- input_field_separator=
- input_line_number
- input_lineno
- input_record_separator
- input_record_separator=
- line_end_processing
- load_path
- loaded_features
- match_platform
- ofs
- ofs=
- options
- ors
- ors=
- output_field_separator
- output_field_separator=
- output_record_separator
- output_record_separator=
- pid
- platform
- process_id
- program_loop
- program_name
- program_name=
- release
- required
- rs
- rs=
- rubylibdir
- rubypath
- safe
- stderr
- stderr=
- stdin
- stdin=
- stdout
- stdout=
- verbose
- verbose=
- version
Alias for default_input
[ show source ]
# File lib/facets/rbsystem.rb, line 55 def argv; $* ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 66 def child_status; $? ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 79 def coding; $-K ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 80 def coding=(x); $-K=x ; end
platform ——————————————————
[ show source ]
# File lib/facets/rbsystem.rb, line 188 def current_platform arch = Config::CONFIG['arch'] #cpu, os = arch.split '-', 2 return match_platform(arch) end
Miscellaneous ———————————————
[ show source ]
# File lib/facets/rbsystem.rb, line 134 def data; DATA ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 72 def debug; $DEBUG; end
[ show source ]
# File lib/facets/rbsystem.rb, line 100 def default_input ; $< ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 104 def default_output ; $> ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 105 def default_output=(x); $defout=x ; end
Alias for default_input
Alias for default_output
Alias for default_output=
[ show source ]
# File lib/facets/rbsystem.rb, line 87 def env; ENV ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 86 def environment; ENV ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 69 def error_info; $! ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 70 def error_position; $@ ; end
Alias for child_status
[ show source ]
# File lib/facets/rbsystem.rb, line 160 def extentions [ 'rb', DLEXT ] end
Alias for input_field_separator
Alias for input_field_separator=
[ show source ]
# File lib/facets/rbsystem.rb, line 124 def input_field_separator ; $/ ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 125 def input_field_separator=(x) ; $/=x ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 129 def input_line_number ; $. ; end
Alias for input_line_number
[ show source ]
# File lib/facets/rbsystem.rb, line 119 def input_record_separator ; $/ ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 120 def input_record_separator=(x) ; $/=x ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 82 def line_end_processing; $-l ; end
load path —————————————————-
[ show source ]
# File lib/facets/rbsystem.rb, line 181 def load_path; $: ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 183 def loaded_features; $" ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 196 def match_platform(arch) cpu, os = arch.split '-', 2 cpu, os = nil, cpu if os.nil? # java cpu = case cpu when /i\d86/ then 'x86' else cpu end os = case os when /cygwin/ then [ 'cygwin', nil ] when /darwin(\d+)?/ then [ 'darwin', $1 ] when /freebsd(\d+)/ then [ 'freebsd', $1 ] when /^java$/ then [ 'java', nil ] when /^java([\d.]*)/ then [ 'java', $1 ] when /linux/ then [ 'linux', $1 ] when /mingw32/ then [ 'mingw32', nil ] when /mswin32/ then [ 'mswin32', nil ] when /openbsd(\d+\.\d+)/ then [ 'openbsd', $1 ] when /solaris(\d+\.\d+)/ then [ 'solaris', $1 ] else [ 'unknown', nil ] end [cpu, os].flatten.compact.join("-") end
Alias for output_field_separator
Alias for output_field_separator=
Alias for argv
Alias for output_record_separator
Alias for output_record_separator=
[ show source ]
# File lib/facets/rbsystem.rb, line 114 def output_field_separator ; $-F ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 115 def output_field_separator=(x) ; $-F=x ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 109 def output_record_separator ; $\ ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 110 def output_record_separator=(x) ; $\=x ; end
Alias for process_id
[ show source ]
# File lib/facets/rbsystem.rb, line 148 def platform RUBY_PLATFORM end
these won't work here
def file; FILE ; end def filepath; File.expand_path(FILE) ; end def lineno; LINE ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 63 def process_id; $$ ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 84 def program_loop; $-p ; end
Execution Environment ————————————-
[ show source ]
# File lib/facets/rbsystem.rb, line 52 def program_name; $0 ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 53 def program_name=(x); $0=x ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 156 def release RUBY_RELEASE_DATE end
Alias for loaded_features
Alias for input_record_separator
Alias for input_record_separator=
[ show source ]
# File lib/facets/rbsystem.rb, line 164 def rubylibdir File.join( libdir, 'ruby' ) end
[ show source ]
# File lib/facets/rbsystem.rb, line 144 def rubypath File.join( bindir, ruby_install_name ) end
[ show source ]
# File lib/facets/rbsystem.rb, line 74 def safe; $SAFE; end
[ show source ]
# File lib/facets/rbsystem.rb, line 97 def stderr ; $stderr ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 98 def stderr=(x); $stderr=x ; end
Input/Ouput Variables ————————————-
[ show source ]
# File lib/facets/rbsystem.rb, line 91 def stdin; $stdin ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 92 def stdin=(x); $stdin=x ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 94 def stdout ; $stdout ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 95 def stdout=(x); $stdout=x ; end
[ show source ]
# File lib/facets/rbsystem.rb, line 76 def verbose; $VERBOSE; end
[ show source ]
# File lib/facets/rbsystem.rb, line 77 def verbose=(x); $VERBOSE=x; end
[ show source ]
# File lib/facets/rbsystem.rb, line 152 def version RUBY_VERSION end