Skip to content

Instantly share code, notes, and snippets.

def split(value, set)
split_value = set.collect {|s| value.split(s) }.delete_if {|arr| arr.count == 1}
split_value.empty? ? [value] : split_value.first
end
values = split('lot 12, 15', ['-','/',','])
street_number = values.first
street_number_to = values.last
@roo
roo / keybase.md
Created November 21, 2019 04:14
keybase

Keybase proof

I hereby claim:

  • I am roo on github.
  • I am rupertq (https://keybase.io/rupertq) on keybase.
  • I have a public key ASC7au0DdiiXenThOUz9XsUGAwDT6ygxCi0eXXQCamndvgo

To claim this, I am signing this object: