Module: System
Overview
System module is inteded for system info. Mostly is is used
as a service module but it can be used as a mixin too module System.
Instance Method Summary collapse
- #argv ⇒ Object (also: #options)
- #child_status ⇒ Object (also: #exit_status)
- #coding ⇒ Object
- #coding=(x) ⇒ Object
- #data ⇒ Object
- #debug ⇒ Object
- #default_input ⇒ Object (also: #defin, #argf)
- #default_output ⇒ Object (also: #defout)
- #default_output=(x) ⇒ Object (also: #defout=)
- #env ⇒ Object
- #error_info ⇒ Object
- #error_position ⇒ Object
- #input_field_separator ⇒ Object (also: #fs)
- #input_field_separator=(x) ⇒ Object (also: #fs=)
- #input_line_number ⇒ Object (also: #input_lineno)
- #input_record_separator ⇒ Object (also: #rs)
- #input_record_separator=(x) ⇒ Object (also: #rs=)
- #line_end_processing ⇒ Object
- #load_path ⇒ Object
- #loaded_features ⇒ Object (also: #required)
- #output_field_separator ⇒ Object (also: #ofs)
- #output_field_separator=(x) ⇒ Object (also: #ofs=)
- #output_record_separator ⇒ Object (also: #ors)
- #output_record_separator=(x) ⇒ Object (also: #ors=)
-
#process_id ⇒ Object
(also: #pid)
these won’t work here def file; __FILE__ ; end def filepath; File.expand_path(__FILE__) ; end def lineno; __LINE__ ; end.
- #program_loop ⇒ Object
-
#program_name ⇒ Object
Execution Environment.
- #program_name=(x) ⇒ Object
- #safe ⇒ Object
- #stderr ⇒ Object
- #stderr=(x) ⇒ Object
-
#stdin ⇒ Object
Input/Ouput Variables.
- #stdin=(x) ⇒ Object
- #stdout ⇒ Object
- #stdout=(x) ⇒ Object
- #verbose ⇒ Object
- #verbose=(x) ⇒ Object
Instance Method Details
#argv ⇒ Object Also known as: options
18 |
# File 'lib/carat-dev/system/system.rb', line 18 def argv; $* ; end |
#child_status ⇒ Object Also known as: exit_status
29 |
# File 'lib/carat-dev/system/system.rb', line 29 def child_status; $? ; end |
#coding ⇒ Object
47 |
# File 'lib/carat-dev/system/system.rb', line 47 def coding; $-K ; end |
#coding=(x) ⇒ Object
48 |
# File 'lib/carat-dev/system/system.rb', line 48 def coding=(x); $-K=x ; end |
#data ⇒ Object
102 |
# File 'lib/carat-dev/system/system.rb', line 102 def data; DATA ; end |
#debug ⇒ Object
35 |
# File 'lib/carat-dev/system/system.rb', line 35 def debug; $DEBUG; end |
#default_input ⇒ Object Also known as: defin, argf
68 |
# File 'lib/carat-dev/system/system.rb', line 68 def default_input; $< ; end |
#default_output ⇒ Object Also known as: defout
72 |
# File 'lib/carat-dev/system/system.rb', line 72 def default_output; $> ; end |
#default_output=(x) ⇒ Object Also known as: defout=
73 |
# File 'lib/carat-dev/system/system.rb', line 73 def default_output=(x); $defout=x ; end |
#env ⇒ Object
54 |
# File 'lib/carat-dev/system/system.rb', line 54 def env; ENV; end |
#error_info ⇒ Object
32 |
# File 'lib/carat-dev/system/system.rb', line 32 def error_info; $! ; end |
#error_position ⇒ Object
33 |
# File 'lib/carat-dev/system/system.rb', line 33 def error_position; $@ ; end |
#input_field_separator ⇒ Object Also known as: fs
92 |
# File 'lib/carat-dev/system/system.rb', line 92 def input_field_separator; $/ ; end |
#input_field_separator=(x) ⇒ Object Also known as: fs=
93 |
# File 'lib/carat-dev/system/system.rb', line 93 def input_field_separator=(x); $/=x ; end |
#input_line_number ⇒ Object Also known as: input_lineno
97 |
# File 'lib/carat-dev/system/system.rb', line 97 def input_line_number; $. ; end |
#input_record_separator ⇒ Object Also known as: rs
87 |
# File 'lib/carat-dev/system/system.rb', line 87 def input_record_separator; $/ ; end |
#input_record_separator=(x) ⇒ Object Also known as: rs=
88 |
# File 'lib/carat-dev/system/system.rb', line 88 def input_record_separator=(x); $/=x ; end |
#line_end_processing ⇒ Object
50 |
# File 'lib/carat-dev/system/system.rb', line 50 def line_end_processing; $-l ; end |
#load_path ⇒ Object
39 |
# File 'lib/carat-dev/system/system.rb', line 39 def load_path; $: ; end |
#loaded_features ⇒ Object Also known as: required
41 |
# File 'lib/carat-dev/system/system.rb', line 41 def loaded_features; $" ; end |
#output_field_separator ⇒ Object Also known as: ofs
82 |
# File 'lib/carat-dev/system/system.rb', line 82 def output_field_separator; $-F ; end |
#output_field_separator=(x) ⇒ Object Also known as: ofs=
83 |
# File 'lib/carat-dev/system/system.rb', line 83 def output_field_separator=(x); $-F=x ; end |
#output_record_separator ⇒ Object Also known as: ors
77 |
# File 'lib/carat-dev/system/system.rb', line 77 def output_record_separator; $\ ; end |
#output_record_separator=(x) ⇒ Object Also known as: ors=
78 |
# File 'lib/carat-dev/system/system.rb', line 78 def output_record_separator=(x); $\=x ; end |
#process_id ⇒ Object Also known as: pid
these won’t work here def file; __FILE__ ; end def filepath; File.expand_path(__FILE__) ; end def lineno; __LINE__ ; end
26 |
# File 'lib/carat-dev/system/system.rb', line 26 def process_id; $$ ; end |
#program_loop ⇒ Object
52 |
# File 'lib/carat-dev/system/system.rb', line 52 def program_loop; $-p ; end |
#program_name ⇒ Object
Execution Environment
15 |
# File 'lib/carat-dev/system/system.rb', line 15 def program_name; $0 ; end |
#program_name=(x) ⇒ Object
16 |
# File 'lib/carat-dev/system/system.rb', line 16 def program_name=(x); $0=x ; end |
#safe ⇒ Object
37 |
# File 'lib/carat-dev/system/system.rb', line 37 def safe; $SAFE; end |
#stderr ⇒ Object
65 |
# File 'lib/carat-dev/system/system.rb', line 65 def stderr; $stderr ; end |
#stderr=(x) ⇒ Object
66 |
# File 'lib/carat-dev/system/system.rb', line 66 def stderr=(x); $stderr=x ; end |
#stdin ⇒ Object
Input/Ouput Variables
59 |
# File 'lib/carat-dev/system/system.rb', line 59 def stdin; $stdin ; end |
#stdin=(x) ⇒ Object
60 |
# File 'lib/carat-dev/system/system.rb', line 60 def stdin=(x); $stdin=x ; end |
#stdout ⇒ Object
62 |
# File 'lib/carat-dev/system/system.rb', line 62 def stdout; $stdout ; end |
#stdout=(x) ⇒ Object
63 |
# File 'lib/carat-dev/system/system.rb', line 63 def stdout=(x); $stdout=x ; end |
#verbose ⇒ Object
44 |
# File 'lib/carat-dev/system/system.rb', line 44 def verbose; $VERBOSE; end |
#verbose=(x) ⇒ Object
45 |
# File 'lib/carat-dev/system/system.rb', line 45 def verbose=(x); $VERBOSE=x; end |