Created
February 28, 2014 09:50
-
-
Save luc4leone/9268269 to your computer and use it in GitHub Desktop.
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
# url = web address | |
# text = the link | |
def link(url, text) | |
"<a href=#{url}>#{text}</a>" | |
end | |
p link("http://dontpuzzle.me", "my web site") | |
# the Output is: | |
# "<a href=http://dontpuzzle.me>my web site</a>" | |
# not correct, because it should be: <a href="http://dontpuzzle.me">my web site</a>" | |
# I tried this: | |
def link(url, text) | |
"<a href=\"#{url}\">#{text}</a>" | |
end | |
# but it doesn't work |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment