Sha256: b6a4ac3d63657023d6ce3d092235bf845186fa5bb7113e922e2a6cd913808777

Contents?: true

Size: 549 Bytes

Versions: 36

Compression:

Stored size: 549 Bytes

Contents

# frozen_string_literal: true

require 'bolt/error'

module Bolt
  class ModuleInstaller
    class Puppetfile
      class Module
        attr_reader :full_name, :name, :type

        def initialize(name)
          @full_name, @name = parse_name(name)
        end

        # Formats the full name and extracts the module name.
        #
        protected def parse_name(name)
          full_name     = name.tr('-', '/')
          first, second = full_name.split('/', 2)

          [full_name, second || first]
        end
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
bolt-3.17.0 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.16.1 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.16.0 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.15.0 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.14.1 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.13.0 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.12.0 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.11.0 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.10.0 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.9.2 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.9.1 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.9.0 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.8.1 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.8.0 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.7.1 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.7.0 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.6.1 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.6.0 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.5.0 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.4.0 lib/bolt/module_installer/puppetfile/module.rb