Skip to content

Instantly share code, notes, and snippets.

@laribee
Created May 24, 2012 16:11
Show Gist options
  • Select an option

  • Save laribee/2782469 to your computer and use it in GitHub Desktop.

Select an option

Save laribee/2782469 to your computer and use it in GitHub Desktop.
# OK
def dilettante
content = []
other_extended_fields_element.div_elements(:class => 'text').each do |c|
content << c.label.text
end
content
end
# BETTER!
def pro
other_extended_fields_element.div_elements(:class => 'text').collect { |c| c.label.text }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment