Exception: RailsHeroicon::UndefinedVariant
- Inherits:
-
StandardError
- Object
- StandardError
- RailsHeroicon::UndefinedVariant
- Defined in:
- lib/rails_heroicon/errors.rb
Instance Method Summary collapse
-
#initialize(msg = "", exception_type = "custom") ⇒ UndefinedVariant
constructor
A new instance of UndefinedVariant.
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 |