Sha256: 117101a562ac5c5c2df74a6e3040531838c51de5f6d91ad2736641a9f5af50bc

Contents?: true

Size: 545 Bytes

Versions: 1

Compression:

Stored size: 545 Bytes

Contents

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

    attr_accessor :cli_options

    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

1 entries across 1 versions & 1 rubygems

Version Path
gli_aziz_light-2.8.1 lib/gli/option_parsing_result.rb