Class: WithClues::Private::BadParams

Inherits:
CustomClueMethodAnalysis show all
Defined in:
lib/with_clues/private/custom_clue_method_analysis.rb

Constant Summary collapse

DEFAULT_ERROR =
"dump must take one required param, one keyword param named context: and an optional keyword param named page:"

Instance Method Summary collapse

Methods inherited from CustomClueMethodAnalysis

from_method, #requires_page_object?, #standard_implementation?

Constructor Details

#initialize(errors) ⇒ BadParams

Returns a new instance of BadParams.



128
129
130
# File 'lib/with_clues/private/custom_clue_method_analysis.rb', line 128

def initialize(errors)
  @message = errors.empty? ? DEFAULT_ERROR : errors.join(", ")
end

Instance Method Details

#raise_exception!Object

Raises:

  • (NameError)


134
135
136
# File 'lib/with_clues/private/custom_clue_method_analysis.rb', line 134

def raise_exception!
  raise NameError.new(@message)
end