lib/sample_cmdlet_patterns/commands/table.rb
# Execute Table command taking input from a input stream
# and writing to output stream
#
# sample: output.puts 'OK'
Execute Table command taking input from a input stream
and writing to output stream


Execute Table command taking input from a input stream and writing to output stream
def execute(input: $stdin, output: $stdout)
        loop do
          case @subcommand
          when :gui
            gui
          when :basic
            require_relative 'table_basic'
            subcmd = SampleCmdletPatterns::Commands::TableBasic.new({})
          when :align
            require_relative 'table_align'
            subcmd = SampleCmdletPatterns::Commands::TableAlign.new({})
          when :multiline
            require_relative 'table_multiline'
            subcmd = SampleCmdletPatterns::Commands::TableMultiline.new({})
          when :padding
            require_relative 'table_padding'
            subcmd = SampleCmdletPatterns::Commands::TablePadding.new({})
          when :width
            require_relative 'table_width'
            subcmd = SampleCmdletPatterns::Commands::TableWidth.new({})
          else
            break
          end
          @subcommand = subcmd&.execute(input: input, output: output)
        end
      end
def execute ( input : $stdin , output : $stdout ) loop do case @subcommand when :gui gui when :basic require_relative 'table_basic' subcmd = SampleCmdletPatterns :: Commands :: TableBasic . new ( { } ) when :align require_relative 'table_align' subcmd = SampleCmdletPatterns :: Commands :: TableAlign . new ( { } ) when :multiline require_relative 'table_multiline' subcmd = SampleCmdletPatterns :: Commands :: TableMultiline . new ( { } ) when :padding require_relative 'table_padding' subcmd = SampleCmdletPatterns :: Commands :: TablePadding . new ( { } ) when :width require_relative 'table_width' subcmd = SampleCmdletPatterns :: Commands :: TableWidth . new ( { } ) else break end @subcommand = subcmd &. execute ( input : input , output : output ) end end
Execute Table command taking input from a input stream
and writing to output stream
Execute Table command taking input from a input stream and writing to output stream
input
output