Module System
In: lib/more/facets/rbsystem.rb

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.

Methods

External Aliases

ruby_install_name -> ruby

Public Instance methods

argf()

Alias for default_input

[Source]

    # File lib/more/facets/rbsystem.rb, line 55
55:   def argv; $* ; end

[Source]

    # File lib/more/facets/rbsystem.rb, line 66
66:   def child_status; $? ; end

[Source]

    # File lib/more/facets/rbsystem.rb, line 79
79:   def coding; $-K ; end

[Source]

    # File lib/more/facets/rbsystem.rb, line 80
80:   def coding=(x); $-K=x ; end

platform ——————————————————

[Source]

     # File lib/more/facets/rbsystem.rb, line 188
188:   def current_platform
189:     arch = Config::CONFIG['arch']
190:     #cpu, os = arch.split '-', 2
191:     return match_platform(arch)
192:   end

Miscellaneous ———————————————

[Source]

     # File lib/more/facets/rbsystem.rb, line 134
134:   def data; DATA ; end

[Source]

    # File lib/more/facets/rbsystem.rb, line 72
72:   def debug; $DEBUG; end

[Source]

     # File lib/more/facets/rbsystem.rb, line 100
100:   def default_input ; $< ; end

[Source]

     # File lib/more/facets/rbsystem.rb, line 104
104:   def default_output ; $> ; end

[Source]

     # File lib/more/facets/rbsystem.rb, line 105
105:   def default_output=(x); $defout=x ; end
defin()

Alias for default_input

defout()

Alias for default_output

defout=(x)

Alias for default_output=

[Source]

    # File lib/more/facets/rbsystem.rb, line 87
87:   def env; ENV ; end

[Source]

    # File lib/more/facets/rbsystem.rb, line 86
86:   def environment; ENV ; end

[Source]

    # File lib/more/facets/rbsystem.rb, line 69
69:   def error_info; $! ; end

[Source]

    # File lib/more/facets/rbsystem.rb, line 70
70:   def error_position; $@ ; end
exit_status()

Alias for child_status

[Source]

     # File lib/more/facets/rbsystem.rb, line 160
160:   def extentions
161:     [ 'rb', DLEXT ]
162:   end
fs()
fs=(x)

[Source]

     # File lib/more/facets/rbsystem.rb, line 124
124:   def input_field_separator ; $/ ; end

[Source]

     # File lib/more/facets/rbsystem.rb, line 125
125:   def input_field_separator=(x) ; $/=x ; end

[Source]

     # File lib/more/facets/rbsystem.rb, line 129
129:   def input_line_number ; $. ; end
input_lineno()

Alias for input_line_number

[Source]

     # File lib/more/facets/rbsystem.rb, line 119
119:   def input_record_separator ; $/ ; end

[Source]

     # File lib/more/facets/rbsystem.rb, line 120
120:   def input_record_separator=(x) ; $/=x ; end

[Source]

    # File lib/more/facets/rbsystem.rb, line 82
82:   def line_end_processing; $-l ; end

load path —————————————————-

[Source]

     # File lib/more/facets/rbsystem.rb, line 181
181:   def load_path; $: ; end

[Source]

     # File lib/more/facets/rbsystem.rb, line 183
183:   def loaded_features; $" ; end

[Source]

     # File lib/more/facets/rbsystem.rb, line 196
196:   def match_platform(arch)
197:     cpu, os = arch.split '-', 2
198:     cpu, os = nil, cpu if os.nil? # java
199: 
200:     cpu = case cpu
201:           when /i\d86/ then 'x86'
202:           else cpu
203:           end
204: 
205:     os  = case os
206:           when /cygwin/ then            [ 'cygwin',  nil ]
207:           when /darwin(\d+)?/ then      [ 'darwin',  $1  ]
208:           when /freebsd(\d+)/ then      [ 'freebsd', $1  ]
209:           when /^java$/ then            [ 'java',    nil ]
210:           when /^java([\d.]*)/ then     [ 'java',    $1  ]
211:           when /linux/ then             [ 'linux',   $1  ]
212:           when /mingw32/ then           [ 'mingw32', nil ]
213:           when /mswin32/ then           [ 'mswin32', nil ]
214:           when /openbsd(\d+\.\d+)/ then [ 'openbsd', $1  ]
215:           when /solaris(\d+\.\d+)/ then [ 'solaris', $1  ]
216:           else                          [ 'unknown', nil ]
217:           end
218: 
219:     [cpu, os].flatten.compact.join("-")
220:   end
ofs()
ofs=(x)
options()

Alias for argv

ors()
ors=(x)

[Source]

     # File lib/more/facets/rbsystem.rb, line 114
114:   def output_field_separator ; $-F ; end

[Source]

     # File lib/more/facets/rbsystem.rb, line 115
115:   def output_field_separator=(x) ; $-F=x ; end

[Source]

     # File lib/more/facets/rbsystem.rb, line 109
109:   def output_record_separator ; $\ ; end

[Source]

     # File lib/more/facets/rbsystem.rb, line 110
110:   def output_record_separator=(x) ; $\=x ; end
pid()

Alias for process_id

[Source]

     # File lib/more/facets/rbsystem.rb, line 148
148:   def platform
149:     RUBY_PLATFORM
150:   end
 these won't work here

def file; FILE ; end def filepath; File.expand_path(FILE) ; end def lineno; LINE ; end

[Source]

    # File lib/more/facets/rbsystem.rb, line 63
63:   def process_id; $$ ; end

[Source]

    # File lib/more/facets/rbsystem.rb, line 84
84:   def program_loop; $-p ; end

Execution Environment ————————————-

[Source]

    # File lib/more/facets/rbsystem.rb, line 52
52:   def program_name; $0 ; end

[Source]

    # File lib/more/facets/rbsystem.rb, line 53
53:   def program_name=(x); $0=x ; end

[Source]

     # File lib/more/facets/rbsystem.rb, line 156
156:   def release
157:     RUBY_RELEASE_DATE
158:   end
required()

Alias for loaded_features

rs()
rs=(x)

[Source]

     # File lib/more/facets/rbsystem.rb, line 164
164:   def rubylibdir
165:     File.join( libdir, 'ruby'  )
166:   end

[Source]

     # File lib/more/facets/rbsystem.rb, line 144
144:   def rubypath
145:     File.join( bindir, ruby_install_name )
146:   end

[Source]

    # File lib/more/facets/rbsystem.rb, line 74
74:   def safe; $SAFE; end

[Source]

    # File lib/more/facets/rbsystem.rb, line 97
97:   def stderr ; $stderr ; end

[Source]

    # File lib/more/facets/rbsystem.rb, line 98
98:   def stderr=(x); $stderr=x ; end

Input/Ouput Variables ————————————-

[Source]

    # File lib/more/facets/rbsystem.rb, line 91
91:   def stdin; $stdin ; end

[Source]

    # File lib/more/facets/rbsystem.rb, line 92
92:   def stdin=(x); $stdin=x ; end

[Source]

    # File lib/more/facets/rbsystem.rb, line 94
94:   def stdout ; $stdout ; end

[Source]

    # File lib/more/facets/rbsystem.rb, line 95
95:   def stdout=(x); $stdout=x ; end

[Source]

    # File lib/more/facets/rbsystem.rb, line 76
76:   def verbose; $VERBOSE; end

[Source]

    # File lib/more/facets/rbsystem.rb, line 77
77:   def verbose=(x); $VERBOSE=x; end

[Source]

     # File lib/more/facets/rbsystem.rb, line 152
152:   def version
153:     RUBY_VERSION
154:   end

[Validate]