Sha256: 334391b55daa7cd78e6964c2d030846370841f66087cfd7dfd22e770bee5a0e4

Contents?: true

Size: 784 Bytes

Versions: 3

Compression:

Stored size: 784 Bytes

Contents

require 'pdk'

module PDK
  module Context
    # Represents a context for a Puppet Module
    class Module < PDK::Context::AbstractContext
      # @param module_root [String] The root path for the module.
      # @param context_path [String] The path where this context was created from e.g. Dir.pwd
      # @see PDK::Context::AbstractContext
      def initialize(module_root, context_path)
        super(context_path)
        @root_path = module_root
      end

      # @see PDK::Context::AbstractContext.pdk_compatible?
      def pdk_compatible?
        PDK::Util.module_pdk_compatible?(root_path)
      end

      # :nocov:
      # @see PDK::Context::AbstractContext.display_name
      def display_name
        'a Puppet Module context'
      end
      # :nocov:
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pdk-3.3.0 lib/pdk/context/module.rb
pdk-3.0.1 lib/pdk/context/module.rb
pdk-3.0.0 lib/pdk/context/module.rb