lib/isono/manifest.rb
def load_module(mod_class, *args)
      unless mod_class.is_a?(Class) && mod_class < Isono::NodeModules::Base
        raise ArgumentError, ""
      end

      return if @node_modules.find{|i| i[0] == mod_class }

      sec_builder = mod_class.instance_variable_get(:@config_section_builder)
      if sec_builder.is_a? Proc
        sec_name = mod_class.instance_variable_get(:@config_section_name)
        #sec_builder.call(ConfigStructBuilder.new(@config.add_section(sec_name)))
        ConfigStructBuilder.new(@config.add_section(sec_name)).instance_eval &sec_builder
      end
      @node_modules << [mod_class, *args]
    end
# Regist a node module class to be initialized/terminated.
# @param [Class] mod_class
Regist a node module class to be initialized/terminated.
Regist a node module class to be initialized / terminated .
def load_module(mod_class, *args)
      unless mod_class.is_a?(Class) && mod_class < Isono::NodeModules::Base
        raise ArgumentError, ""
      end
      return if @node_modules.find{|i| i[0] == mod_class }
      sec_builder = mod_class.instance_variable_get(:@config_section_builder)
      if sec_builder.is_a? Proc
        sec_name = mod_class.instance_variable_get(:@config_section_name)
        ConfigStructBuilder.new(@config.add_section(sec_name)).instance_eval &sec_builder
      end
      @node_modules << [mod_class, *args]
    end
def load_module ( mod_class , * args ) unless mod_class . is_a? ( Class ) && mod_class < Isono :: NodeModules :: Base raise ArgumentError , "" end return if @node_modules . find { | i | i [ 0 ] == mod_class } sec_builder = mod_class . instance_variable_get ( :@config_section_builder ) if sec_builder . is_a? Proc sec_name = mod_class . instance_variable_get ( :@config_section_name ) ConfigStructBuilder . new ( @config . add_section ( sec_name ) ) . instance_eval & sec_builder end @node_modules << [ mod_class , * args ] end
Regist a node module class to be initialized/terminated.
Regist a node module class to be initialized / terminated .
#sec_builder.call(ConfigStructBuilder.new(@config.add_section(sec_name)))
mod_class
args
None