class Dry::CLI::Parser::Result

@since 0.1.0 @api private

Attributes

arguments[R]

@since 0.1.0 @api private

error[R]

@since 0.1.0 @api private

Public Class Methods

failure(error = "Error: Invalid param provided") click to toggle source

@since 0.1.0 @api private

# File lib/dry/cli/parser.rb, line 104
def self.failure(error = "Error: Invalid param provided")
  new(error: error)
end
help() click to toggle source

@since 0.1.0 @api private

# File lib/dry/cli/parser.rb, line 92
def self.help
  new(help: true)
end
new(arguments: {}, error: nil, help: false) click to toggle source

@since 0.1.0 @api private

# File lib/dry/cli/parser.rb, line 118
def initialize(arguments: {}, error: nil, help: false)
  @arguments = arguments
  @error     = error
  @help      = help
end
success(arguments = {}) click to toggle source

@since 0.1.0 @api private

# File lib/dry/cli/parser.rb, line 98
def self.success(arguments = {})
  new(arguments: arguments)
end

Public Instance Methods

error?() click to toggle source

@since 0.1.0 @api private

# File lib/dry/cli/parser.rb, line 126
def error?
  !error.nil?
end
help?() click to toggle source

@since 0.1.0 @api private

# File lib/dry/cli/parser.rb, line 132
def help?
  @help
end