Created
October 1, 2015 17:34
-
-
Save rjswenson/413c58d6896a8ea65e50 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def assemble_ii(item) | |
match = item.class.to_s.match('Inventory([0-9]+)')[1] | |
if match == "05" | |
region = "-#{match}" | |
else | |
region = "" | |
end | |
@ii = { | |
key: item.upc, | |
source: item.warehouse + region, # have to do above for this | |
quantities: [] | |
} | |
end | |
def ii_changed?(item) | |
match = item.class.to_s.match('Inventory([0-9]+)')[1] | |
if match == "05" | |
region = "-#{match}" | |
else | |
region = "" | |
end | |
@ii[:key] != item.upc || @ii[:source] != item.warehouse + region | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment