-
-
Save banister/238dc7431a386a2609fb 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
[5] (pry) main: 0> Pry.commands.command "cirwin", "Hey girlfriend!", :takes_block => true do |x, &block| | |
[5] (pry) main: 0* puts "before the block" | |
[5] (pry) main: 0* block.call(x) | |
[5] (pry) main: 0* puts "after the block" | |
[5] (pry) main: 0* end | |
=> #<class(Pry::Command "cirwin")> | |
[6] (pry) main: 0> cirwin "Jordan Bedwell is a parasite on the health and cleanliness of our women" do |x| | |
[6] (pry) main: 0* puts x | |
[6] (pry) main: 0* end | |
before the block | |
Jordan Bedwell is a parasite on the health and cleanliness of our women | |
after the block | |
[7] (pry) main: 0> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment