"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 # regular inverted method calls
JSON.parse(Net::HTTP.get(URI.parse(url)))
# could be written left to right
url.pipe { URI.parse; Net::HTTP.get; JSON.parse }
# or top to bottom for even more clarity
url.pipe do
URI.parse
Net::HTTP.get
JSON.parse
end
[0] Revert pipeline operator: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/... * Engineering Manager
* Senior/Staff/Principal Data Scientist
* Senior/Staff/Principal Software Engineer
* Design/Finance/HR/Marketing/Operations/Product/Sales/etc
Please check out our openings for more details! https://grnh.se/18ad65801 * Engineering Manager
* Senior/Staff/Principal Data Scientist
* Senior/Staff/Principal Software Engineer
* Design/Finance/HR/Marketing/Operations/Product/Sales/etc
Please check out our openings for more details! https://grnh.se/18ad65801 * Engineering Manager
* Senior Data Scientist
* Software Engineer (Frontend or Backend)
* Design/Finance/HR/Marketing/Operations/Product/Sales/etc
Check out our job openings and apply at: https://grnh.se/18ad65801
https://github.com/lendinghome/pipe_operator#-pipe_operator