Module: Kernel
- Includes:
- BuiltinCommands
- Defined in:
- lib/rust/helpers/io.rb,
lib/rust/commands/builtins.rb
Instance Method Summary
collapse
builtins, #cd, commands, #exit, #help, #ls, #parser, #pwd, #read, register, register_builtin, #rm, #test, #type
Instance Method Details
#ask(*arr) ⇒ Object
To be used by any parsers for all I/O
105
106
107
|
# File 'lib/rust/helpers/io.rb', line 105
def ask(*arr)
Rust.io.ask(*arr)
end
|
#builtin_commands ⇒ Object
#builtins ⇒ Object
Also known as:
internals
#color(string, *colors) ⇒ Object
121
122
123
124
125
126
127
128
129
130
|
# File 'lib/rust/helpers/io.rb', line 121
def color( string, *colors )
colors.map! do |c|
if c.is_a? Symbol
self.class.const_get(c.to_s.upcase)
else
c
end
end
"#{colors.flatten.join}#{string}#{CLEAR}"
end
|
#err(*arr) ⇒ Object
113
114
115
|
# File 'lib/rust/helpers/io.rb', line 113
def err(*arr)
Rust.io.err(*arr)
end
|
#say(*arr) ⇒ Object
117
118
119
|
# File 'lib/rust/helpers/io.rb', line 117
def say(*arr)
Rust.io.say(*arr)
end
|
#tell(*arr) ⇒ Object
109
110
111
|
# File 'lib/rust/helpers/io.rb', line 109
def tell(*arr)
Rust.io.tell(*arr)
end
|