Sha256: df233015b84bdcb7e98ef6fb05301d7ca4c1291b263acb4e26b4ab3da1e98c72
Contents?: true
Size: 1.09 KB
Versions: 14
Compression:
Stored size: 1.09 KB
Contents
# frozen_string_literal: true require 'kubs_cli/file_helper' require 'kubs_cli/configuration' require 'kubs_cli/version' require 'kubs_cli/cli' require 'kubs_cli/install' require 'kubs_cli/copy' require 'kubs_cli/pull' # Top level class module KubsCLI # Location of default config and dependencies EXAMPLES = File.join(File.expand_path(__dir__), 'examples') class Error < StandardError; end # Specifies class methods class << self attr_accessor :errors # Allows users to specify various configurations based on their liking attr_writer :configuration # Adds an error to KubsCLI#errors # @param e [Error] Error raised # @param msg [String] Message to display # return Array<Error> Implicitly reutrns the array of errors def add_error(e:, msg: nil) KubsCLI.errors << e.exception(msg) end # Prints the errors when finished running def print_errors KubsCLI.errors.each { |e| puts e.message } end # Resets errors to a blank array def clear_errors @errors = [] end end # Allows access via KubsCLI.errors @errors ||= [] end
Version data entries
14 entries across 14 versions & 1 rubygems