summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordon Bedwell <jordon@envygeeks.com>2012-03-14 11:36:15 -0500
committerJordon Bedwell <jordon@envygeeks.com>2012-03-14 11:36:15 -0500
commitbdffdd580e3486c4f8bfd7264e237c2d46b8c418 (patch)
tree30f1b1ccf8502489f375d5147833e0d283f71516
parente9459550c793442d77584716ac11bbaf0f5e3418 (diff)
downloadpry-bdffdd580e3486c4f8bfd7264e237c2d46b8c418.tar.gz
Have Pry::Plugin::Manager.define to use Base and implement Pry::Plugin.define.
-rw-r--r--lib/pry/plugins.rb8
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