Class: Shell

Inherits:
IRB::Command::Base
  • Object
show all
Defined in:
lib/alet/irb/command/sh.rb

Instance Method Summary collapse

Instance Method Details

#execute(arg) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/alet/irb/command/sh.rb', line 6

def execute(arg)
  ::IRB.conf[:INSPECT_MODE] = false
  return puts `#{arg}` if arg.size > 0

  s = $stdin.gets
  while s
    puts `#{s}`
    s = $stdin.gets
  end
ensure
  ::IRB.conf[:INSPECT_MODE] = true
end