Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created August 25, 2015 14:53
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