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.6.1 lib/gli/option_parsing_result.rb
gli-2.6.0 lib/gli/option_parsing_result.rb
gli-2.6.0.rc1 lib/gli/option_parsing_result.rb