Class: WithClues::Private::BadParams
- Inherits:
-
CustomClueMethodAnalysis
- Object
- CustomClueMethodAnalysis
- WithClues::Private::BadParams
- 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
-
#initialize(errors) ⇒ BadParams
constructor
A new instance of BadParams.
- #raise_exception! ⇒ Object
Methods inherited from CustomClueMethodAnalysis
from_method, #requires_page_object?, #standard_implementation?
Constructor Details
#initialize(errors) ⇒ BadParams
Returns a new instance of BadParams.
134 135 136 137 138 139 140 |
# File 'lib/with_clues/private/custom_clue_method_analysis.rb', line 134 def initialize(errors) if errors.empty? raise ArgumentError,"BadParams requires errors" else @message = errors.map(&:to_s).join(", ") end end |
Instance Method Details
#raise_exception! ⇒ Object
144 145 146 |
# File 'lib/with_clues/private/custom_clue_method_analysis.rb', line 144 def raise_exception! raise NameError.new(@message) end |