Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created August 25, 2015 14:53
Show Gist options
  • Save anonymous/6f1711d4aaf93d67362a to your computer and use it in GitHub Desktop.
Save anonymous/6f1711d4aaf93d67362a to your computer and use it in GitHub Desktop.
def get_row( *columns )
if( !block_given? )
raise MyError
end
puts "Block should exist"
# later on I call yield
...
end
#####
get_row( :col_a, :col_b ) do |hash|
puts hash
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment