|
|
|
|
|
by bonquesha99
1282 days 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://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
|
|