Module: Yap::Shell::Builtins

Defined in:
lib/yap/shell/builtins.rb,
lib/yap/shell/builtins/cd.rb,
lib/yap/shell/builtins/env.rb,
lib/yap/shell/builtins/alias.rb

Constant Summary collapse

DIRECTORY_HISTORY =
[]
DIRECTORY_FUTURE =
[]
Color =
::Term::ANSIColor

Class Method Summary collapse

Class Method Details

.builtin(name, &blk) ⇒ Object



5
6
7
# File 'lib/yap/shell/builtins.rb', line 5

def self.builtin(name, &blk)
  Yap::Shell::BuiltinCommand.add(name, &blk)
end

.execute_builtin(name, world:, args:, stdin:, stdout:, stderr:) ⇒ Object



9
10
11
12
# File 'lib/yap/shell/builtins.rb', line 9

def self.execute_builtin(name, world:, args:, stdin:, stdout:, stderr:)
  command = Yap::Shell::BuiltinCommand.new(world:world, str:name, args: args)
  command.execute(stdin:stdin, stdout:stdout, stderr:stderr)
end