method

yield_self

Importance_1
Ruby latest stable (v2_5_5) - 0 notes - Class: Object
yield_self() public

Yields self to the block and returns the result of the block.

"my string".yield_self {|s| s.upcase }   #=> "MY STRING"
3.next.yield_self {|x| x**x }.to_s       #=> "256"
Show source
Register or log in to add new notes.