module Syskit::Actions::ProfileDefinitionDSL

Public Instance Methods

profile(name, &block) click to toggle source

Declares a new syskit profile, and registers it as a constant on this module

A syskit profile is a group of dependency injections (use flags) and instance definitions. All the definitions it contains can then be exported on an action interface using {use_profile}

@return [Syskit::Actions::Profile]

# File lib/syskit/actions/profile.rb, line 617
def profile(name, &block)
    if const_defined_here?(name)
        profile = const_get(name)
    else
        profile = Profile.new("#{self.name}::#{name}", register: true)
        const_set(name, profile)
    end
    if block
        profile.instance_eval(&block)
    end
    profile
end