Sha256: 6e27f22d51d3bca0ecd2a9ab5277b4670862c5d43dd8c4496f8713ccff9fb49b

Contents?: true

Size: 567 Bytes

Versions: 17

Compression:

Stored size: 567 Bytes

Contents

# frozen_string_literal: true

require_relative '../../../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

17 entries across 17 versions & 1 rubygems

Version Path
bolt-3.29.0 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.28.0 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.27.4 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.27.2 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.27.1 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.26.2 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.26.1 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.25.0 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.24.0 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.23.1 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.23.0 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.22.1 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.22.0 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.21.0 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.20.0 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.19.0 lib/bolt/module_installer/puppetfile/module.rb
bolt-3.18.0 lib/bolt/module_installer/puppetfile/module.rb