Sha256: 140cf0c0b411ec195ad43843b49c7f20ae7ed912471725a3336732d6580db82b

Contents?: true

Size: 760 Bytes

Versions: 1

Compression:

Stored size: 760 Bytes

Contents

module Quickl
  class Command
    module Robustness
      include Naming
      
      # Checks that a command whose name is given exists
      # or raises a NoSuchCommand.
      def has_command!(name, referer = self.class)
        Quickl.deprecated("Command#has_command!", "Quickl.sub_command!", caller)
        Quickl.sub_command!(referer, name)
      end
      
      # Checks that _file_ is a readable file or raises an error.
      # Returns _file_ on success.
      def valid_read_file!(file, error_class = nil, msg = nil)
        Quickl.deprecated("Command#valid_read_file!", "Quickl.valid_read_file!", caller)
        Quickl.valid_read_file!(file, error_class, msg)
      end
      
    end # module Robustness
  end # class Command
end # module Quickl

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
quickl-0.3.0 lib/quickl/command/robustness.rb