Class: Spade::Shell
- Inherits:
-
Object
- Object
- Spade::Shell
- Defined in:
- lib/spade/shell.rb
Instance Attribute Summary collapse
-
#ctx ⇒ Object
Returns the value of attribute ctx.
Instance Method Summary collapse
- #exit(status = 0) ⇒ Object (also: #quit)
- #help(*args) ⇒ Object
- #to_s ⇒ Object
Instance Attribute Details
#ctx ⇒ Object
Returns the value of attribute ctx.
10 11 12 |
# File 'lib/spade/shell.rb', line 10 def ctx @ctx end |
Instance Method Details
#exit(status = 0) ⇒ Object Also known as: quit
16 17 18 |
# File 'lib/spade/shell.rb', line 16 def exit(status=0) ctx.reactor.exit(status) end |
#help(*args) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/spade/shell.rb', line 22 def help(*args) <<-HELP print(msg) print msg to STDOUT exit(status = 0) exit the shell also: quit() evalrb(source) evaluate some ruby source HELP end |
#to_s ⇒ Object
12 13 14 |
# File 'lib/spade/shell.rb', line 12 def to_s "[object Shell]" end |