Exception: Pakyow::UnknownPlugin

Inherits:
Error
  • Object
show all
Defined in:
lib/pakyow/errors.rb

Instance Attribute Summary

Attributes inherited from Error

#context, #wrapped_exception

Instance Method Summary collapse

Methods inherited from Error

build, #cause, #condensed_backtrace, #details, #initialize, #name, new_with_message, #path, #project?

Constructor Details

This class inherits a constructor from Pakyow::Error

Instance Method Details

#contextual_messageObject



79
80
81
82
83
84
85
86
87
88
89
# File 'lib/pakyow/errors.rb', line 79

def contextual_message
  available_plugins = Pakyow.plugins.keys.each_with_object(String.new) { |plugin_name, available_plugins_message|
    available_plugins_message << "  - #{plugin_name.inspect}\n"
  }

  <<~MESSAGE
    Try using one of these available plugins:

    #{available_plugins}
  MESSAGE
end