Sha256: 881204083bf28e784cdaf54d8458a0db2f6cbd043f50c89069d191d0c1607f15

Contents?: true

Size: 488 Bytes

Versions: 9

Compression:

Stored size: 488 Bytes

Contents

# frozen_string_literal: true

module PuppetfileResolver
  module Models
    class PuppetSpecification
      attr_reader :name
      attr_accessor :version

      def initialize(version)
        require 'semantic_puppet'

        @name = 'Puppet'
        @version = version.nil? ? nil : ::SemanticPuppet::Version.parse(version)
      end

      def to_s
        @version.nil? ? name.to_s : "#{name}-#{version}"
      end

      def dependencies(*_)
        []
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
puppetfile-resolver-0.6.3 lib/puppetfile-resolver/models/puppet_specification.rb
puppetfile-resolver-0.6.2 lib/puppetfile-resolver/models/puppet_specification.rb
puppetfile-resolver-0.6.1 lib/puppetfile-resolver/models/puppet_specification.rb
puppetfile-resolver-0.6.0 lib/puppetfile-resolver/models/puppet_specification.rb
puppetfile-resolver-0.5.0 lib/puppetfile-resolver/models/puppet_specification.rb
puppetfile-resolver-0.4.0 lib/puppetfile-resolver/models/puppet_specification.rb
puppetfile-resolver-0.3.0 lib/puppetfile-resolver/models/puppet_specification.rb
puppetfile-resolver-0.2.0 lib/puppetfile-resolver/models/puppet_specification.rb
puppetfile-resolver-0.1.0 lib/puppetfile-resolver/models/puppet_specification.rb