summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordon Bedwell <jordon@envygeeks.com>2012-03-14 10:05:59 -0500
committerJordon Bedwell <jordon@envygeeks.com>2012-03-14 10:05:59 -0500
commitdbcfaa109555399dd570f8e6e9f13841bf7707b4 (patch)
tree662e35998e8b49277ceff91211f2a520b491fd46
parent6f66704bb605546f6b8529a5273b63d4cf038ce2 (diff)
downloadpry-dbcfaa109555399dd570f8e6e9f13841bf7707b4.tar.gz
Convert loaded to the helper method loaded? so it makes even more sense in the end.
-rw-r--r--lib/pry/plugins.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/pry/plugins.rb b/lib/pry/plugins.rb
index 765a7f48..c998e8b0 100644
--- a/lib/pry/plugins.rb
+++ b/lib/pry/plugins.rb
@@ -51,7 +51,10 @@ class Pry
@prefix = v
end
- def loaded; @plugins.dup end
+ def loaded?(p)
+ @plugins.has_key?(p)
+ end
+
def enabled; @enabled.dup end
def disabled; @disabled.dup end
@@ -271,7 +274,7 @@ class Pry
protected
def define_plugin(opts)
opts = Pry::Plugins.validate_opts(opts)
- if Pry::Plugins.loaded[opts[:name]].nil?
+ if Pry::Plugins.loaded?(opts[:name])
return raise "Bailing #{opts[:name]} does not match gem."
end