class Klass
def hello(*args)
"Hello " + args.join(' ')
end
end
k = Klass.new
k.send :hello, "gentle", "readers" #=> "Hello gentle readers"
Created
May 2, 2014 03:09
-
-
Save qcam/11466882 to your computer and use it in GitHub Desktop.
How to call a symbol method in Ruby
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment