Skip to content

Instantly share code, notes, and snippets.

@iamvery
Last active May 24, 2017 19:19
Show Gist options
  • Save iamvery/33102fdd942f5c355103ebc2f01dae59 to your computer and use it in GitHub Desktop.
Save iamvery/33102fdd942f5c355103ebc2f01dae59 to your computer and use it in GitHub Desktop.

Run the example.

$ ruby pipes.rb
FOO
BAR
$
class Object
def >>(proc)
proc.call(self)
end
end
upcase = :upcase.to_proc
split = :split.to_proc
puts 'foo bar' >> upcase >> split
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment