[DOC] Remove repeated examples for Kernel#then
This commit is contained in:
parent
5eb7cbf4e3
commit
bae3d68134
Notes:
git
2024-10-02 08:08:03 +00:00
@ -118,15 +118,6 @@ module Kernel
|
||||
# # does not meet condition, drop value
|
||||
# 2.then.detect(&:odd?) # => nil
|
||||
#
|
||||
# Good usage for +then+ is value piping in method chains:
|
||||
#
|
||||
# require 'open-uri'
|
||||
# require 'json'
|
||||
#
|
||||
# construct_url(arguments).
|
||||
# then {|url| URI(url).read }.
|
||||
# then {|response| JSON.parse(response) }
|
||||
#
|
||||
def then
|
||||
Primitive.attr! :inline_block
|
||||
unless defined?(yield)
|
||||
|
Loading…
x
Reference in New Issue
Block a user