Class: Alf::Shell::Exec

Inherits:
Object
  • Object
show all
Defined in:
lib/alf/shell/command/exec.rb

Instance Method Summary collapse

Instance Method Details

#execute(args) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/alf/shell/command/exec.rb', line 5

def execute(args)
  cmd = if f = args.first
    Path(f).read
  else
    $stdin.read
  end
  database.query(cmd)
end