Sha256: 3769eeedcd6159f9491280b8b39e88bb1d372c1d16701a803538d3eb86db69a3

Contents?: true

Size: 1.45 KB

Versions: 36

Compression:

Stored size: 1.45 KB

Contents

module HybridPlatformsConductor

  # Base class for all plugins
  class Plugin

    include LoggerHelpers

    class << self

      include LoggerHelpers

      # Class loggers
      attr_accessor :logger, :logger_stderr

      # Are dependencies met before using this plugin?
      # This method can be overriden by any plugin
      #
      # Result::
      # * Boolean: Are dependencies met before using this plugin?
      def valid?
        true
      end

      # Extend the config DSL used when parsing the hpc_config.rb file with a given Mixin.
      # This can be used by any plugin to add plugin-specific configuration in the hpc_config.rb file.
      #
      # Parameters::
      # * *mixin* (Module): Mixin to add to the Platforms DSL
      # * *init_method* (Symbol or nil): The initializer method of this Mixin, or nil if none [default = nil]
      def extend_config_dsl_with(mixin, init_method = nil)
        Config.extend_config_dsl_with(mixin, init_method)
      end

    end

    # Constructor
    #
    # Parameters::
    # * *logger* (Logger): Logger to be used [default: Logger.new(STDOUT)]
    # * *logger_stderr* (Logger): Logger to be used for stderr [default: Logger.new(STDERR)]
    # * *config* (Config): Config to be used. [default: Config.new]
    def initialize(
      logger: Logger.new(STDOUT),
      logger_stderr: Logger.new(STDERR),
      config: Config.new
    )
      init_loggers(logger, logger_stderr)
      @config = config
    end

  end

end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
hybrid_platforms_conductor-33.0.0 lib/hybrid_platforms_conductor/plugin.rb
hybrid_platforms_conductor-32.18.0 lib/hybrid_platforms_conductor/plugin.rb
hybrid_platforms_conductor-32.17.1 lib/hybrid_platforms_conductor/plugin.rb
hybrid_platforms_conductor-32.17.0 lib/hybrid_platforms_conductor/plugin.rb
hybrid_platforms_conductor-32.16.4 lib/hybrid_platforms_conductor/plugin.rb
hybrid_platforms_conductor-32.16.3 lib/hybrid_platforms_conductor/plugin.rb
hybrid_platforms_conductor-32.16.2 lib/hybrid_platforms_conductor/plugin.rb
hybrid_platforms_conductor-32.16.1 lib/hybrid_platforms_conductor/plugin.rb
hybrid_platforms_conductor-32.16.0 lib/hybrid_platforms_conductor/plugin.rb
hybrid_platforms_conductor-32.15.0 lib/hybrid_platforms_conductor/plugin.rb
hybrid_platforms_conductor-32.14.0 lib/hybrid_platforms_conductor/plugin.rb
hybrid_platforms_conductor-32.13.4 lib/hybrid_platforms_conductor/plugin.rb
hybrid_platforms_conductor-32.13.3 lib/hybrid_platforms_conductor/plugin.rb
hybrid_platforms_conductor-32.13.2 lib/hybrid_platforms_conductor/plugin.rb
hybrid_platforms_conductor-32.13.1 lib/hybrid_platforms_conductor/plugin.rb
hybrid_platforms_conductor-32.13.0 lib/hybrid_platforms_conductor/plugin.rb
hybrid_platforms_conductor-32.12.0 lib/hybrid_platforms_conductor/plugin.rb
hybrid_platforms_conductor-32.11.2 lib/hybrid_platforms_conductor/plugin.rb
hybrid_platforms_conductor-32.11.1 lib/hybrid_platforms_conductor/plugin.rb
hybrid_platforms_conductor-32.11.0 lib/hybrid_platforms_conductor/plugin.rb