Skip to content

Instantly share code, notes, and snippets.

@clauswitt
Created September 5, 2013 12:17
Show Gist options
  • Save clauswitt/6449381 to your computer and use it in GitHub Desktop.
Save clauswitt/6449381 to your computer and use it in GitHub Desktop.
xml = items.select {|item| item[:title].downcase.start_with?(ARGV[0].downcase) }.map { |item| "<item uid=\"activity\" arg=\"#{item[:title]}\"><title>#{item[:title]}</title><subtitle>Concentrate on #{item[:title]}</subtitle><icon>icon.png</icon></item>"}.join('')
puts "<items>#{xml}</items>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment