lib/origen/pins/pin.rb
# Add a way to update packages for the pins after the pins have been added.
#
# @example Updating a package after the pin has been added
# dut.add_pin :p1
# dut.add_package: package1
# dut.add_package: package2
# dut.pin(:p1).packages # => {}
# dut.pin(:p1).update_packages :packages # => [:package1, :package2]
# dut.pin(:p1).packages # => {:package1=>{}, :package2=>{}}
Add a way to update packages for the pins after the pins have been added.
Add a way to update packages for the pins after the pins have been added .
def update_packages(options = {})
        packages = resolve_packages(options)
        packages.each do |package_id|
          package_id = package_id.respond_to?(:id) ? package_id.id : package_id
          myself.packages[package_id] ||= {}
        end
      end
def update_packages ( options = { } ) packages = resolve_packages ( options ) packages . each do | package_id | package_id = package_id . respond_to? ( :id ) ? package_id . id : package_id myself . packages [ package_id ] ||= { } end end
Add a way to update packages for the pins after the pins have been added.
Add a way to update packages for the pins after the pins have been added .
options
<not_specific>
example
Updating a package after the pin has been added dut.add_pin :p1 dut.add_package: package1 dut.add_package: package2 dut.pin(:p1).packages # => {} dut.pin(:p1).update_packages :packages # => [:package1, :package2] dut.pin(:p1).packages # => {:package1=>{}, :package2=>{}}
Updating a package after the pin has been added dut . add_pin : p1 dut . add_package : package1 dut . add_package : package2 dut . pin ( : p1 ) . packages # = > {} dut . pin ( : p1 ) . update_packages : packages # = > [ : package1 : package2 ] dut . pin ( : p1 ) . packages # = > { : package1 = > {} : package2 = > {} }