Skip to content

Instantly share code, notes, and snippets.

@fixr
Created November 9, 2010 23:46
Show Gist options
  • Save fixr/670066 to your computer and use it in GitHub Desktop.
Save fixr/670066 to your computer and use it in GitHub Desktop.
workitem.command
def command= (com)
com = com.is_a?(Array) ? com : com.split(' ')
if com[1]
if com[0] == "jump"
com[1] = (com[2].nil? ? com[1] : com[2])
com.delete_at(2) if com[2]
else
com[1] = com[1].to_i
end
end
@h['fields']['__command__'] = com
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment