class Chef::Provider::Package::Dnf::Version
helper class to assist in passing around name/version/arch triples
Attributes
arch[RW]
name[RW]
version[RW]
Public Class Methods
new(name, version, arch)
click to toggle 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
==(other)
click to toggle 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?
matches_name_and_arch?(other)
click to toggle source
# File lib/chef/provider/package/dnf/version.rb, line 47 def matches_name_and_arch?(other) other.version == version && other.arch == arch end
name_with_arch()
click to toggle source
# File lib/chef/provider/package/dnf/version.rb, line 43 def name_with_arch "#{name}.#{arch}" unless name.nil? end
to_s()
click to toggle source
# File lib/chef/provider/package/dnf/version.rb, line 35 def to_s "#{name}-#{version}.#{arch}" unless version.nil? end
version_with_arch()
click to toggle source
# File lib/chef/provider/package/dnf/version.rb, line 39 def version_with_arch "#{version}.#{arch}" unless version.nil? end