mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Set plugin options before requiring the plugin.
Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>
This commit is contained in:
parent
048a58b85b
commit
70dfb424a8
1 changed files with 3 additions and 3 deletions
|
@ -42,6 +42,9 @@ class Pry
|
|||
# disabled)
|
||||
# Does not reload plugin if it's already active.
|
||||
def activate!
|
||||
# Create the configuration object for the plugin.
|
||||
Pry.config.send("#{gem_name.gsub('-', '_')}=", OpenStruct.new)
|
||||
|
||||
begin
|
||||
require gem_name if !active?
|
||||
rescue LoadError => e
|
||||
|
@ -49,9 +52,6 @@ class Pry
|
|||
warn e
|
||||
end
|
||||
|
||||
# Create the configuration object for the plugin.
|
||||
Pry.config.send("#{gem_name.gsub('-', '_')}=", OpenStruct.new)
|
||||
|
||||
self.active = true
|
||||
self.enabled = true
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue