B
Bob Sanders
I know that to find an item that satisfies one condition, it's this:
@items.find {|item| item.product == product }
I thought I could try this to check that an item satisfies multiple
conditions:
@items.find {|item|
item.product == product
item.red == red
item.blue == blue
}
Of course, I'm not getting desirable results from that. Do you know how
I would correctly find an item that satisfies multiple conditions?
@items.find {|item| item.product == product }
I thought I could try this to check that an item satisfies multiple
conditions:
@items.find {|item|
item.product == product
item.red == red
item.blue == blue
}
Of course, I'm not getting desirable results from that. Do you know how
I would correctly find an item that satisfies multiple conditions?