1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

lib/pry/commands/ls/ls_entity.rb: use Proc#call instead of Proc#[]

The boys disliked my procs :(
I changed my procs.
My procs look beautiful now.
The boys like it :)
This commit is contained in:
Kyrylo Silin 2013-12-03 10:19:53 +02:00
parent 59b01c0e6d
commit b0fe06d988

View file

@ -36,27 +36,27 @@ class Pry
end
def globals
greppable[Globals.new(@target, @opts)]
greppable.call(Globals.new(@target, @opts))
end
def constants
greppable[Constants.new(@interrogatee, @target, @no_user_opts, @opts)]
greppable.call(Constants.new(@interrogatee, @target, @no_user_opts, @opts))
end
def methods
greppable[Methods.new(@interrogatee, @no_user_opts, @opts)]
greppable.call(Methods.new(@interrogatee, @no_user_opts, @opts))
end
def self_methods
greppable[SelfMethods.new(@interrogatee, @no_user_opts, @opts)]
greppable.call(SelfMethods.new(@interrogatee, @no_user_opts, @opts))
end
def instance_vars
InstanceVars.new(@interrogatee, @no_user_opts, @opts)
greppable.call(InstanceVars.new(@interrogatee, @no_user_opts, @opts))
end
def local_names
greppable[LocalNames.new(@target, @no_user_opts, @sticky_locals, @args)]
greppable.call(LocalNames.new(@target, @no_user_opts, @sticky_locals, @args))
end
def local_vars