Class: Syskit::Models::Composition::DynamicServiceInstantiationContext::Child Private
- Inherits:
- BasicObject
- Defined in:
- lib/syskit/models/composition.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- 
  
    
      #initialize(context, child)  ⇒ Child 
    
    
  
  
  
    constructor
  
  
  
  
  
  private
  
    A new instance of Child. 
- #method_missing(m, *args) ⇒ Object private
- #require_dynamic_service(dynamic_service_name, as: nil, **dyn_options) ⇒ Object private
- #respond_to_missing?(m, include_private) ⇒ Boolean private
Constructor Details
#initialize(context, child) ⇒ Child
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Child
| 543 544 545 546 | # File 'lib/syskit/models/composition.rb', line 543 def initialize(context, child) @context = context @child = child end | 
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
| 561 562 563 564 565 566 567 | # File 'lib/syskit/models/composition.rb', line 561 def method_missing(m, *args) if m.to_s =~ /_port$/ @child.public_send(m, *args) else super end end | 
Instance Method Details
#require_dynamic_service(dynamic_service_name, as: nil, **dyn_options) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
| 548 549 550 551 552 | # File 'lib/syskit/models/composition.rb', line 548 def require_dynamic_service(dynamic_service_name, as: nil, **) @child = @context.specialized_child(@child) srv = @child.model.require_dynamic_service(dynamic_service_name, as: as, **) srv.attach(@child) end | 
#respond_to_missing?(m, include_private) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
| 554 555 556 557 558 559 | # File 'lib/syskit/models/composition.rb', line 554 def respond_to_missing?(m, include_private) if m.to_s =~ /_port$/ @child.respond_to?(m) else super end end |