class Shelley::NonInteractiveShell
A non-interactive shell. Executes given commands sequentially
Public Class Methods
new(command_registry, commands)
click to toggle source
# File lib/shelley/shells.rb, line 45 def initialize(command_registry, commands) @command_registry = command_registry @commands = commands end
Public Instance Methods
start()
click to toggle source
Starts the shell
# File lib/shelley/shells.rb, line 51 def start @commands.each do |command| begin puts "> #{command}" @command_registry.execute_command(command) rescue StandardError => msg puts msg end end end