Advertisement
Guest User

Untitled

a guest
Aug 16th, 2012
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. I have a hash loaded in from a yaml file
  2.  
  3. its loaded in as : {:class => 'titled-box-body'}
  4.  
  5. I need to pass it to a function that only allows:
  6. element_exists?(rockstar, :div, :class => 'titled-box-body')
  7.  
  8. But when I pass it into the function via the yaml variable
  9. It looks like this and does not work.
  10. element_exists?(rockstar, :div, {:class => 'titled-box-body'})
  11.  
  12.  
  13. So my question is how to I convert:
  14. {:class => 'titled-box-body'}
  15. to:
  16. :class => 'titled-box-body'
  17.  
  18. and am i missing something here? I'm thinking they should be
  19. exactly the same as far as ruby is concerned...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement