Sha256: 160f29a6ba10e7e6586fa182a92f83bd12475086a3b0755d164e741f86893ef4

Contents?: true

Size: 513 Bytes

Versions: 43

Compression:

Stored size: 513 Bytes

Contents

module GLI
  class OptionParsingResult
    attr_accessor :global_options
    attr_accessor :command
    attr_accessor :command_options
    attr_accessor :arguments

    def convert_to_openstruct!
      @global_options  = Options.new(@global_options)
      @command_options = Options.new(@command_options)
      self
    end

    # Allows us to splat this object into blocks and methods expecting parameters in this order
    def to_a
      [@global_options,@command,@command_options,@arguments]
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
gli-2.22.2 lib/gli/option_parsing_result.rb
gli-2.22.1 lib/gli/option_parsing_result.rb
gli-2.22.0 lib/gli/option_parsing_result.rb
gli-2.21.5 lib/gli/option_parsing_result.rb
gli-2.21.4 lib/gli/option_parsing_result.rb
gli-2.21.3 lib/gli/option_parsing_result.rb
gli-2.21.2 lib/gli/option_parsing_result.rb
gli-2.21.1 lib/gli/option_parsing_result.rb
gli-2.21.0 lib/gli/option_parsing_result.rb
gli-2.20.1 lib/gli/option_parsing_result.rb
gli-2.20.0 lib/gli/option_parsing_result.rb
gli-2.19.2 lib/gli/option_parsing_result.rb
gli-2.19.1 lib/gli/option_parsing_result.rb
gli-2.19.0 lib/gli/option_parsing_result.rb
gli-2.18.2 lib/gli/option_parsing_result.rb
gli-2.18.1 lib/gli/option_parsing_result.rb
gli-2.18.0 lib/gli/option_parsing_result.rb
gli-2.17.2 lib/gli/option_parsing_result.rb
gli-2.17.1 lib/gli/option_parsing_result.rb
gli-2.17.0 lib/gli/option_parsing_result.rb