class Chef::Provider::Package::Dnf::Version
helper class to assist in passing around name/version/arch triples
Attributes
Public Class Methods
Source
# File lib/chef/provider/package/dnf/version.rb, line 29 def initialize(name, version, arch) @name = name @version = version @arch = arch end
Public Instance Methods
Source
# File lib/chef/provider/package/dnf/version.rb, line 51 def ==(other) name == other.name && version == other.version && arch == other.arch end
Also aliased as: eql?
Source
# File lib/chef/provider/package/dnf/version.rb, line 47 def matches_name_and_arch?(other) other.version == version && other.arch == arch end
Source
# File lib/chef/provider/package/dnf/version.rb, line 43 def name_with_arch "#{name}.#{arch}" unless name.nil? end
Source
# File lib/chef/provider/package/dnf/version.rb, line 35 def to_s "#{name}-#{version}.#{arch}" unless version.nil? end
Source
# File lib/chef/provider/package/dnf/version.rb, line 39 def version_with_arch "#{version}.#{arch}" unless version.nil? end