Exception: ViewComponent::ReservedSingularSlotNameError
- Inherits:
-
InvalidSlotNameError
- Object
- StandardError
- InvalidSlotNameError
- ViewComponent::ReservedSingularSlotNameError
- Defined in:
- lib/view_component/errors.rb
Constant Summary collapse
- MESSAGE =
"COMPONENT declares a slot named SLOT_NAME, which is a reserved word in the ViewComponent framework.\n\n" \ "To fix this issue, choose a different name."
Instance Method Summary collapse
-
#initialize(klass_name, slot_name) ⇒ ReservedSingularSlotNameError
constructor
A new instance of ReservedSingularSlotNameError.
Constructor Details
#initialize(klass_name, slot_name) ⇒ ReservedSingularSlotNameError
Returns a new instance of ReservedSingularSlotNameError.
139 140 141 |
# File 'lib/view_component/errors.rb', line 139 def initialize(klass_name, slot_name) super(MESSAGE.gsub("COMPONENT", klass_name.to_s).gsub("SLOT_NAME", slot_name.to_s)) end |