Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Declare A Shorthand Proc In Ruby 1.9

DZone's Guide to

Declare A Shorthand Proc In Ruby 1.9

·
Free Resource

welcome = ->{puts 'hi'}
#=> #
  
   
welcome.call
#=> hi

  
I discovered this while reading a tweet from @railshoster [twitter.com]
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}