Sha256: 5b76fbb03f3495b65dfaa79121715c6376f16c1e1696a8767d799f400021facc

Contents?: true

Size: 512 Bytes

Versions: 3

Compression:

Stored size: 512 Bytes

Contents

module Hyperdrive
  module Errors
    module DSL
      class UnknownArgument < RuntimeError
        def initialize(argument, method_name)
          @argument = case argument
                      when Symbol
                        ":#{argument}"
                      else
                        argument.to_s
                      end
          @method_name = method_name
        end

        def message
          "#{@argument} is not supported by `#{@method_name}'."
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hyperdrive-0.0.6 lib/hyperdrive/errors/dsl/unknown_argument.rb
hyperdrive-0.0.5 lib/hyperdrive/errors/dsl/unknown_argument.rb
hyperdrive-0.0.4 lib/hyperdrive/errors/dsl/unknown_argument.rb