Exception: RailsHeroicon::UndefinedVariant

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

Instance Method Summary collapse

Constructor Details

#initialize(msg = "", exception_type = "custom") ⇒ UndefinedVariant

Returns a new instance of UndefinedVariant.



3
4
5
6
7
8
# File 'lib/rails_heroicon/errors.rb', line 3

def initialize(msg = "", exception_type = "custom")
  msg = msg.empty? ? "Variant should be one of #{RailsHeroicon::VARIANTS.join(", ")}" : msg
  @exception_type = exception_type

  super(msg)
end