Sha256: 73f9bdec63a96cccbbf161c7e25e0ed6c32af7ebe4cc97b344be9df4f16034b3
Contents?: true
Size: 563 Bytes
Versions: 31
Compression:
Stored size: 563 Bytes
Contents
# frozen_string_literal: true module FriendlyShipping class ShipmentOptions def initialize( package_options: Set.new, package_options_class: PackageOptions ) @package_options = package_options @package_options_class = package_options_class end def options_for_package(package) package_options.detect do |package_option| package_option.package_id == package.id end || package_options_class.new(package_id: nil) end private attr_reader :package_options, :package_options_class end end
Version data entries
31 entries across 31 versions & 1 rubygems