diff options
author | Jordon Bedwell <jordon@envygeeks.com> | 2012-03-14 11:36:15 -0500 |
---|---|---|
committer | Jordon Bedwell <jordon@envygeeks.com> | 2012-03-14 11:36:15 -0500 |
commit | bdffdd580e3486c4f8bfd7264e237c2d46b8c418 (patch) | |
tree | 30f1b1ccf8502489f375d5147833e0d283f71516 | |
parent | e9459550c793442d77584716ac11bbaf0f5e3418 (diff) | |
download | pry-bdffdd580e3486c4f8bfd7264e237c2d46b8c418.tar.gz |
Have Pry::Plugin::Manager.define to use Base and implement Pry::Plugin.define.
-rw-r--r-- | lib/pry/plugins.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/pry/plugins.rb b/lib/pry/plugins.rb index 0c735d3b..881c1b92 100644 --- a/lib/pry/plugins.rb +++ b/lib/pry/plugins.rb @@ -131,7 +131,7 @@ class Pry begin @enabled[lower_name] = @plugins[lower_name] = { :user_plugin => true, - :instance => Pry::Plugins::User.const_set(name, Class.new(Pry::Plugin::User, &block)) + :instance => Pry::Plugins::User.const_set(name, Class.new(Pry::Plugin::Base, &block)) } rescue => error @enabled.delete(lower_name) @@ -264,6 +264,12 @@ class Pry end end end + + class << self + def define(*args, &block) + Manager.define(*args, &block) + end + end end end |