Skip to content

Instantly share code, notes, and snippets.

@2called-chaos
Last active February 12, 2018 17:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 2called-chaos/510fbfbcd1e38729025ee85489bbfb65 to your computer and use it in GitHub Desktop.
Save 2called-chaos/510fbfbcd1e38729025ee85489bbfb65 to your computer and use it in GitHub Desktop.
[1] pry(main)> class Fooo
[1] pry(main)* def initialize a, b
[1] pry(main)* end
[1] pry(main)* end
55µs => :initialize
[5] pry(main)> Foo.instance_method(:initialize).arity
31µs => 2
[6] pry(main)> Foo.instance_method(:initialize).source_location
31µs => ["(pry)", 2]
[8] pry(main)> Foo.instance_method(:initialize).parameters
33µs => [[:req, :a], [:req, :b]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment