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:
parent
898507c0c3
commit
5679b6fa31
1 changed files with 12 additions and 0 deletions
|
@ -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?
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue