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

add Pry::Method() wrapper method

This commit is contained in:
Ryan Fitzgerald 2012-01-09 19:59:13 -08:00
parent 898507c0c3
commit 5679b6fa31

View file

@ -1,5 +1,17 @@
# -*- coding: utf-8 -*-
class Pry
class << self
# If the given object is a `Pry::Method`, return it unaltered. If it's
# anything else, return it wrapped in a `Pry::Method` instance.
def Method(obj)
if obj.is_a? Pry::Method
obj
else
Pry::Method.new(obj)
end
end
end
class Method
include RbxMethod if Helpers::BaseHelpers.rbx?