Method: IPXACT::Component#initialize

Defined in:
lib/ipxact/component.rb

#initialize(instance_name, id_args) ⇒ Component

Creates a new IPXACT::Component instance

Parameters:

  • instance_name (String)

    The name that will be used for identifying this specific component instance component.

  • id_args

    The component’s identifier. Can be either a Hash or an Identifier



58
59
60
61
62
63
64
65
# File 'lib/ipxact/component.rb', line 58

def initialize(instance_name, id_args)
  @subcomponents = {}
  @interconnections = {}
  @hierconnections = {}
  @ports = []
  @ipxact_id = id_args.is_a?(Hash) ? IPXACT::Identifier.new(id_args) : id_args
  @instance_name = instance_name
end