Method: LicenseAcceptance::ProductReader#lookup
- Defined in:
- lib/license_acceptance/product_reader.rb
#lookup(parent_id, parent_version) ⇒ Object
61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/license_acceptance/product_reader.rb', line 61 def lookup(parent_id, parent_version) parent_product = products.fetch(parent_id) do raise UnknownProduct.new(parent_id) end children = relationships.fetch(parent_product, []) unless parent_version.is_a? String raise ProductVersionTypeError.new(parent_version) end ProductRelationship.new(parent_product, children, parent_version) end |