Module: Opensteam::Base::ExistByPropertiesExtension
- Defined in:
- lib/opensteam/base.rb
Overview
Extension for the Product-Inventory association
Instance Method Summary collapse
-
#exist_by_properties?(p) ⇒ Boolean
checks if an Inventory-Objects exists, which is associated with the given properties.
Instance Method Details
#exist_by_properties?(p) ⇒ Boolean
checks if an Inventory-Objects exists, which is associated with the given properties
19 20 21 |
# File 'lib/opensteam/base.rb', line 19 def exist_by_properties?( p ) collect(&:properties).collect(&:sort).include?( p.kind_of?( Array ) ? p.sort : p ) end |