Class: Spade::Runtime::Shell

Inherits:
Object
  • Object
show all
Defined in:
lib/spade/runtime/shell.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ctxObject

Returns the value of attribute ctx.



10
11
12
# File 'lib/spade/runtime/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/runtime/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/runtime/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_sObject



12
13
14
# File 'lib/spade/runtime/shell.rb', line 12

def to_s
  "[object Shell]"
end