Exception: RailsIcons::LibraryNotFound

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

Instance Method Summary collapse

Constructor Details

#initialize(library_name) ⇒ LibraryNotFound

Returns a new instance of LibraryNotFound.



11
12
13
14
15
16
17
# File 'lib/rails_icons/errors.rb', line 11

def initialize(library_name)
  if library_name.empty?
    super("No libraries were specified. Please choose from: #{RailsIcons.libraries.keys.to_sentence(last_word_connector: " or ")}")
  else
    super("The library `#{library_name}` is not available. Please check the library name and try again.")
  end
end