public
Created

Kleyn: FP II

  • Download Gist
block_example.rb
Ruby
1 2 3 4 5 6 7
def some_method
yield if block_given?
end
 
some_method do
puts 1 + 1
end # => 2

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.