6 ms·
Check out this proof of concept gem to perform pipe operations in Ruby using block expressions: https://github.com/lendinghome/pipe_operator#-pipe_operator htt
by bonquesha99 4y ago
Check out this proof of concept gem to perform pipe operations in Ruby using block expressions:
https://github.com/lendinghome/pipe_operator#-pipe_operator https://github.com/lendinghome/pipe_operator#-pipe_operator
"https://api.github.com/repos/ruby/ruby".pipe do
URI.parse
Net::HTTP.get
JSON.parse.fetch("stargazers_count")
yield_self { |n| "Ruby has #{n} stars" }
Kernel.puts
end
#=> Ruby has 15120 stars