Created
December 8, 2013 10:45
-
-
Save mkwiatkowski/7855778 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
$ irb | |
2.0.0p247 :001 > def link_to(text, address) # <= pasting method definition | |
2.0.0p247 :002?> p "<a href='#{address}'>#{text}</a>" | |
2.0.0p247 :003?> end | |
=> nil | |
2.0.0p247 :004 > link_to("Bloc", "http://www.bloc.io") # <= manually invoking the method with some arguments | |
"<a href='http://www.bloc.io'>Bloc</a>" # <= what your method printed | |
=> "<a href='http://www.bloc.io'>Bloc</a>" # <= what your method returned | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment