Class: Origen::Component::Component

Inherits:
Object
  • Object
show all
Includes:
Origen::Componentable
Defined in:
lib/origen/components.rb

Overview

Componentable Component class. This is the general purpose container to just 'add a thing'

Constant Summary collapse

COMPONENTABLE_ADDS_ACCESSORS =
true

Instance Method Summary collapse

Methods included from Origen::Componentable

#[], #_add, #_instantiate_class, #_plural_name, #_push_accessor, #_singleton_name, #_split_by_instances, #add, add_included_callback, componentable_names, #copy, #delete, #delete!, #delete_all, #each, #has?, included, init_includer_class, init_parent_class, #instances_of, #list, #move, origen_model_init, #parent, #parent=, parent_class_evaled?, #select

Constructor Details

#initializeComponent

Kind of ironic really, but since we're auto-including this when Origen::Model is included, we can't include Origen::Model here or else we'll get a circular dependency. Note that the parent will still initialize correctly, but we need to initialize Components manually. I.e, the parent will get methods :component, :add_components, :components, etc., but the Component object won't be initialized so everything will fail.


18
19
20
# File 'lib/origen/components.rb', line 18

def initialize
  Origen::Componentable.init_includer_class(self)
end