Found this source code on GitHub:
def objects_from_response(klass, request_method, path, options={})
response = send(request_method.to_sym, path, options)[:body]
objects_from_array(klass, response)
end
For this specific line:
response = send(request_method.to_sym, path, options)[:body]
What is that [:body] syntax after the method?
public_sendinstead ofsendis much better if you only want dynamic method calling, not visibility bypassing.response = my_method(path, options)[:body].