lib/sample_cmdlet_patterns/commands/spinner.rb
def execute(input: $stdin, output: $stdout)
        loop do
          case @subcommand
          when :gui
            gui
          when :simple
            require_relative 'spinner_simple'
            subcmd = SampleCmdletPatterns::Commands::SpinnerSimple.new({})
          when :multi
            require_relative 'spinner_multi'
            subcmd = SampleCmdletPatterns::Commands::SpinnerMulti.new({})
          when :in_block
            require_relative 'spinner_in_block'
            subcmd = SampleCmdletPatterns::Commands::SpinnerInBlock.new({})
          when :good_bad
            require_relative 'spinner_good_bad'
            subcmd = SampleCmdletPatterns::Commands::SpinnerGoodBad.new({})
          when :formats
            require_relative 'spinner_formats'
            subcmd = SampleCmdletPatterns::Commands::SpinnerFormats.new({})
          else
            break
          end
          @subcommand = subcmd&.execute(input: input, output: output)
        end
      end
# Execute Spinner command taking input from a input stream
# and writing to output stream
#
# sample: output.puts 'OK'
Execute Spinner command taking input from a input stream
and writing to output stream


Execute Spinner 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 :simple
            require_relative 'spinner_simple'
            subcmd = SampleCmdletPatterns::Commands::SpinnerSimple.new({})
          when :multi
            require_relative 'spinner_multi'
            subcmd = SampleCmdletPatterns::Commands::SpinnerMulti.new({})
          when :in_block
            require_relative 'spinner_in_block'
            subcmd = SampleCmdletPatterns::Commands::SpinnerInBlock.new({})
          when :good_bad
            require_relative 'spinner_good_bad'
            subcmd = SampleCmdletPatterns::Commands::SpinnerGoodBad.new({})
          when :formats
            require_relative 'spinner_formats'
            subcmd = SampleCmdletPatterns::Commands::SpinnerFormats.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 :simple require_relative 'spinner_simple' subcmd = SampleCmdletPatterns :: Commands :: SpinnerSimple . new ( { } ) when :multi require_relative 'spinner_multi' subcmd = SampleCmdletPatterns :: Commands :: SpinnerMulti . new ( { } ) when :in_block require_relative 'spinner_in_block' subcmd = SampleCmdletPatterns :: Commands :: SpinnerInBlock . new ( { } ) when :good_bad require_relative 'spinner_good_bad' subcmd = SampleCmdletPatterns :: Commands :: SpinnerGoodBad . new ( { } ) when :formats require_relative 'spinner_formats' subcmd = SampleCmdletPatterns :: Commands :: SpinnerFormats . new ( { } ) else break end @subcommand = subcmd &. execute ( input : input , output : output ) end end
Execute Spinner command taking input from a input stream
and writing to output stream
Execute Spinner command taking input from a input stream and writing to output stream
input
output