Sha256: 57416b1971317fab84d03ca81cfef99f2fc99b514f47a9b506c34e0ec7e2b3a9
Contents?: true
Size: 866 Bytes
Versions: 14
Compression:
Stored size: 866 Bytes
Contents
# frozen_string_literal: true module Dry # General purpose Command Line Interface (CLI) framework for Ruby # # @since 0.1.0 class CLI # @since 0.2.0 class Error < StandardError end # @since 0.2.1 class UnknownCommandError < Error # @since 0.2.1 # @api private def initialize(command_name) super("unknown command: `#{command_name}'") end end # @since 0.2.0 class InvalidCallbackError < Error # @since 0.2.0 # @api private def initialize(callback) message = case callback when Class "expected `#{callback.inspect}' to respond to `#initialize' with arity 0" else "expected `#{callback.inspect}' to respond to `#call'" end super(message) end end end end
Version data entries
14 entries across 14 versions & 2 rubygems