Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Object.const_defined? :Integer
#=> true
class Integer
#...
end
def Integer(value)
#...
end
Object.private_method_defined? :Integer
#=> true
class MyClass:
def __init__(self, value):
self.value = value
my_class = MyClass(1) # We are calling the class to get
# an instance, instead of
# MyClass.new(1) in Ruby
Integer.class
#=> Class
Integer(1)
#=> 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.