Module: Opensteam::Base::ExistByPropertiesExtension

Defined in:
lib/opensteam/base.rb

Overview

DEPRECATED ! Extension for the Product-Inventory association

Instance Method Summary collapse

Instance Method Details

#exist_by_properties?(p) ⇒ Boolean

checks if an Inventory-Objects exists, which is associated with the given properties

Returns:

  • (Boolean)


36
37
38
# File 'lib/opensteam/base.rb', line 36

def exist_by_properties?( p )
  collect(&:properties).collect(&:sort).include?( p.kind_of?( Array ) ? p.sort : p )
end