Guest User

Untitled

a guest
Jan 22nd, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. # Probably the proper way to check a hash for options
  2. def my_method(options = {})
  3. if options.has_key?(:key) && !options[:key].nil?
  4. # do something using the option here
  5. end
  6. end
Add Comment
Please, Sign In to add comment