Sha256: cc14d520e73f25eb96b1559bfac82b8b0a96cb6a03e5790957ddddef3d68952b

Contents?: true

Size: 782 Bytes

Versions: 2

Compression:

Stored size: 782 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

2 entries across 2 versions & 1 rubygems

Version Path
pdk-2.7.1 lib/pdk/context/module.rb
pdk-2.7.0 lib/pdk/context/module.rb