Exception: ViewComponent::AlreadyDefinedPolymorphicSlotSetterError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/view_component/errors.rb

Constant Summary collapse

MESSAGE =
"A method called 'SETTER_METHOD_NAME' already exists and would be overwritten by the 'SETTER_NAME' polymorphic " \
"slot setter.\n\nPlease choose a different setter name."

Instance Method Summary collapse

Constructor Details

#initialize(setter_method_name, setter_name) ⇒ AlreadyDefinedPolymorphicSlotSetterError

Returns a new instance of AlreadyDefinedPolymorphicSlotSetterError.



236
237
238
# File 'lib/view_component/errors.rb', line 236

def initialize(setter_method_name, setter_name)
  super(MESSAGE.gsub("SETTER_METHOD_NAME", setter_method_name.to_s).gsub("SETTER_NAME", setter_name.to_s))
end