Created
June 24, 2015 06:56
-
-
Save ozgun/0cfae18b5a95a31cad28 to your computer and use it in GitHub Desktop.
Ruby: module_function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module AuthHelperMethods | |
# Call callback_url method from inside another class as below: | |
# | |
# AuthHelperMethods.callback_url('a', 'b', 1) | |
# | |
def callback_url(base_url, provider, app_id) | |
[base_url, "/members/auth/#{provider}/callback/#{app_id}"].join | |
end | |
module_function :callback_url | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment