Class: EnhanceRepo::RpmMd::Resource

Inherits:
Object
  • Object
show all
Defined in:
lib/enhance_repo/rpm_md/resource.rb

Overview

represents a resource in repomd.xml

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#checksumObject

Returns the value of attribute checksum.



32
33
34
# File 'lib/enhance_repo/rpm_md/resource.rb', line 32

def checksum
  @checksum
end

#locationObject

Returns the value of attribute location.



32
33
34
# File 'lib/enhance_repo/rpm_md/resource.rb', line 32

def location
  @location
end

#openchecksumObject

Returns the value of attribute openchecksum.



32
33
34
# File 'lib/enhance_repo/rpm_md/resource.rb', line 32

def openchecksum
  @openchecksum
end

#timestampObject

Returns the value of attribute timestamp.



32
33
34
# File 'lib/enhance_repo/rpm_md/resource.rb', line 32

def timestamp
  @timestamp
end

#typeObject

Returns the value of attribute type.



31
32
33
# File 'lib/enhance_repo/rpm_md/resource.rb', line 31

def type
  @type
end

Instance Method Details

#==(other) ⇒ Object

define equality based on the location as it has no sense to have two resources for the same location



37
38
39
40
# File 'lib/enhance_repo/rpm_md/resource.rb', line 37

def ==(other)
  return (location == other.location) if other.is_a?(Resource)
  false
end