HEX
Server: Apache
System: Windows NT MAGNETO-ARM 10.0 build 22000 (Windows 10) AMD64
User: Michel (0)
PHP: 7.4.7
Disabled: NONE
Upload Files
File: C:/Ruby27-x64/share/ri/2.7.0/system/Object/then-i.ri
U:RDoc::AnyMethod[iI"	then:ETI"Object#then;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph;	[I"BYields self to the block and returns the result of the block.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;	[I"83.next.then {|x| x**x }.to_s             #=> "256"
;TI">"my string".yield_self {|s| s.upcase }   #=> "MY STRING"
;T:@format0o;
;	[I"<Good usage for +then+ is value piping in method chains:;T@o;;	[I"require 'open-uri'
;TI"require 'json'
;TI"
;TI"construct_url(arguments).
;TI"%  then {|url| open(url).read }.
;TI"/  then {|response| JSON.parse(response) }
;T;
0o;
;	[I"AWhen called without block, the method returns +Enumerator+, ;TI"5which can be used, for example, for conditional ;TI"circuit-breaking:;T@o;;	[	I"# meets condition, no-op
;TI"-1.then.detect(&:odd?)            # => 1
;TI"+# does not meet condition, drop value
;TI".2.then.detect(&:odd?)            # => nil;T;
0:
@fileI"
object.c;T:0@omit_headings_from_table_of_contents_below0I"0obj.then {|x| block }          -> an_object;T0[I"();T@)FI"Object;TcRDoc::NormalClass00