Exception: Hyperdrive::Errors::DSL::UnknownArgument

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/hyperdrive/errors/dsl/unknown_argument.rb

Instance Method Summary collapse

Constructor Details

#initialize(argument, method_name) ⇒ UnknownArgument

Returns a new instance of UnknownArgument.



5
6
7
8
9
10
11
12
13
# File 'lib/hyperdrive/errors/dsl/unknown_argument.rb', line 5

def initialize(argument, method_name)
  @argument = case argument
              when Symbol
                ":#{argument}"
              else
                argument.to_s
              end
  @method_name = method_name
end

Instance Method Details

#messageObject



15
16
17
# File 'lib/hyperdrive/errors/dsl/unknown_argument.rb', line 15

def message
  "DSL Error: The argument you supplied (#{@argument}) is not supported by the `#{@method_name}' method."
end