lib/sample_cmdlet_patterns/commands/toc.rb
def execute(input: $stdin, output: $stdout)
        loop do
          case @command
          when :a
            require_relative 'a'
            cmd = SampleCmdletPatterns::Commands::A.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :cursor
            require_relative 'cursor'
            cmd = SampleCmdletPatterns::Commands::Cursor.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :editor
            require_relative 'editor'
            cmd = SampleCmdletPatterns::Commands::Editor.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :font
            require_relative 'font'
            cmd = SampleCmdletPatterns::Commands::Font.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :key_reader
            require_relative 'key_reader'
            cmd = SampleCmdletPatterns::Commands::KeyReader.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :link
            require_relative 'link'
            cmd = SampleCmdletPatterns::Commands::Link.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :log
            require_relative 'log'
            cmd = SampleCmdletPatterns::Commands::Log.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :markdown
            require_relative 'markdown'
            cmd = SampleCmdletPatterns::Commands::Markdown.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :pager
            require_relative 'pager'
            cmd = SampleCmdletPatterns::Commands::Pager.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :pie
            require_relative 'pie'
            cmd = SampleCmdletPatterns::Commands::Pie.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :platform
            require_relative 'platform'
            cmd = SampleCmdletPatterns::Commands::Platform.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :progress_bar
            require_relative 'progress_bar'
            cmd = SampleCmdletPatterns::Commands::ProgressBar.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :prompt
            require_relative 'prompt'
            cmd = SampleCmdletPatterns::Commands::Prompt.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :screen
            require_relative 'screen'
            cmd = SampleCmdletPatterns::Commands::Screen.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :spinner
            require_relative 'spinner'
            cmd = SampleCmdletPatterns::Commands::Spinner.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :table
            require_relative 'table'
            cmd = SampleCmdletPatterns::Commands::Table.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :which
            require_relative 'which'
            cmd = SampleCmdletPatterns::Commands::Which.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :exit
            break
          else
            @command = gui
          end
          
        end
      end
# Execute  command taking input from a input stream
# and writing to output stream
#
# sample: output.puts 'OK'
Execute  command taking input from a input stream
and writing to output stream


Execute command taking input from a input stream and writing to output stream
def execute(input: $stdin, output: $stdout)
        loop do
          case @command
          when :a
            require_relative 'a'
            cmd = SampleCmdletPatterns::Commands::A.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :cursor
            require_relative 'cursor'
            cmd = SampleCmdletPatterns::Commands::Cursor.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :editor
            require_relative 'editor'
            cmd = SampleCmdletPatterns::Commands::Editor.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :font
            require_relative 'font'
            cmd = SampleCmdletPatterns::Commands::Font.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :key_reader
            require_relative 'key_reader'
            cmd = SampleCmdletPatterns::Commands::KeyReader.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :link
            require_relative 'link'
            cmd = SampleCmdletPatterns::Commands::Link.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :log
            require_relative 'log'
            cmd = SampleCmdletPatterns::Commands::Log.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :markdown
            require_relative 'markdown'
            cmd = SampleCmdletPatterns::Commands::Markdown.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :pager
            require_relative 'pager'
            cmd = SampleCmdletPatterns::Commands::Pager.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :pie
            require_relative 'pie'
            cmd = SampleCmdletPatterns::Commands::Pie.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :platform
            require_relative 'platform'
            cmd = SampleCmdletPatterns::Commands::Platform.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :progress_bar
            require_relative 'progress_bar'
            cmd = SampleCmdletPatterns::Commands::ProgressBar.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :prompt
            require_relative 'prompt'
            cmd = SampleCmdletPatterns::Commands::Prompt.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :screen
            require_relative 'screen'
            cmd = SampleCmdletPatterns::Commands::Screen.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :spinner
            require_relative 'spinner'
            cmd = SampleCmdletPatterns::Commands::Spinner.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :table
            require_relative 'table'
            cmd = SampleCmdletPatterns::Commands::Table.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :which
            require_relative 'which'
            cmd = SampleCmdletPatterns::Commands::Which.new('gui', {})
            @command = cmd&.execute(input: input, output: output)
          when :exit
            break
          else
            @command = gui
          end
        end
      end
def execute ( input : $stdin , output : $stdout ) loop do case @command when :a require_relative 'a' cmd = SampleCmdletPatterns :: Commands :: A . new ( 'gui' , { } ) @command = cmd &. execute ( input : input , output : output ) when :cursor require_relative 'cursor' cmd = SampleCmdletPatterns :: Commands :: Cursor . new ( 'gui' , { } ) @command = cmd &. execute ( input : input , output : output ) when :editor require_relative 'editor' cmd = SampleCmdletPatterns :: Commands :: Editor . new ( 'gui' , { } ) @command = cmd &. execute ( input : input , output : output ) when :font require_relative 'font' cmd = SampleCmdletPatterns :: Commands :: Font . new ( 'gui' , { } ) @command = cmd &. execute ( input : input , output : output ) when :key_reader require_relative 'key_reader' cmd = SampleCmdletPatterns :: Commands :: KeyReader . new ( 'gui' , { } ) @command = cmd &. execute ( input : input , output : output ) when :link require_relative 'link' cmd = SampleCmdletPatterns :: Commands :: Link . new ( 'gui' , { } ) @command = cmd &. execute ( input : input , output : output ) when :log require_relative 'log' cmd = SampleCmdletPatterns :: Commands :: Log . new ( 'gui' , { } ) @command = cmd &. execute ( input : input , output : output ) when :markdown require_relative 'markdown' cmd = SampleCmdletPatterns :: Commands :: Markdown . new ( 'gui' , { } ) @command = cmd &. execute ( input : input , output : output ) when :pager require_relative 'pager' cmd = SampleCmdletPatterns :: Commands :: Pager . new ( 'gui' , { } ) @command = cmd &. execute ( input : input , output : output ) when :pie require_relative 'pie' cmd = SampleCmdletPatterns :: Commands :: Pie . new ( 'gui' , { } ) @command = cmd &. execute ( input : input , output : output ) when :platform require_relative 'platform' cmd = SampleCmdletPatterns :: Commands :: Platform . new ( 'gui' , { } ) @command = cmd &. execute ( input : input , output : output ) when :progress_bar require_relative 'progress_bar' cmd = SampleCmdletPatterns :: Commands :: ProgressBar . new ( 'gui' , { } ) @command = cmd &. execute ( input : input , output : output ) when :prompt require_relative 'prompt' cmd = SampleCmdletPatterns :: Commands :: Prompt . new ( 'gui' , { } ) @command = cmd &. execute ( input : input , output : output ) when :screen require_relative 'screen' cmd = SampleCmdletPatterns :: Commands :: Screen . new ( 'gui' , { } ) @command = cmd &. execute ( input : input , output : output ) when :spinner require_relative 'spinner' cmd = SampleCmdletPatterns :: Commands :: Spinner . new ( 'gui' , { } ) @command = cmd &. execute ( input : input , output : output ) when :table require_relative 'table' cmd = SampleCmdletPatterns :: Commands :: Table . new ( 'gui' , { } ) @command = cmd &. execute ( input : input , output : output ) when :which require_relative 'which' cmd = SampleCmdletPatterns :: Commands :: Which . new ( 'gui' , { } ) @command = cmd &. execute ( input : input , output : output ) when :exit break else @command = gui end end end
Execute  command taking input from a input stream
and writing to output stream
Execute command taking input from a input stream and writing to output stream
input
output