lib/vedeu/plugins/plugin.rb in vedeu-0.8.0 vs lib/vedeu/plugins/plugin.rb in vedeu-0.8.1

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + module Vedeu # A class responsible for plugin loading. # class Plugin @@ -27,11 +29,11 @@ # @param gem [Gem::Specification] The RubyGems gem. # @return [Vedeu::Plugin] def initialize(name, gem) @name = name @gem = gem - @gem_name = "vedeu_#{name}".freeze + @gem_name = "vedeu_#{name}" @enabled = false end # Load the plugin (require the gem). # @@ -39,13 +41,13 @@ def load! begin require gem_name unless enabled? rescue LoadError => error raise Vedeu::Error::Fatal, - "Unable to load plugin #{gem_name} due to #{error}.".freeze + "Unable to load plugin #{gem_name} due to #{error}." rescue => error raise Vedeu::Error::Fatal, - "require '#{gem_name}' failed with #{error}.".freeze + "require '#{gem_name}' failed with #{error}." end @enabled = true end