Skip to content

Instantly share code, notes, and snippets.

@nsmith
Last active December 18, 2015 04:18
Show Gist options
  • Select an option

  • Save nsmith/5723951 to your computer and use it in GitHub Desktop.

Select an option

Save nsmith/5723951 to your computer and use it in GitHub Desktop.
Sub sku crossover skus
def crossover_sku(sku)
sku1 = sku.code.split("-")[0..3].join("-")
sku2 = sku.code.split("-")[4..7].join("-")
[sku1, sku2]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment