Class: EnhanceRepo::RpmMd::DeltaRpm
- Defined in:
- lib/enhance_repo/rpm_md/delta_info.rb
Instance Attribute Summary collapse
-
#sequence ⇒ Object
Returns the value of attribute sequence.
-
#sourcerpm ⇒ Object
Returns the value of attribute sourcerpm.
Attributes inherited from PackageId
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(filename) ⇒ DeltaRpm
constructor
A new instance of DeltaRpm.
Methods inherited from PackageId
#ident, #matches, #method_missing, #to_s
Constructor Details
#initialize(filename) ⇒ DeltaRpm
Returns a new instance of DeltaRpm.
41 42 43 44 45 46 47 48 49 |
# File 'lib/enhance_repo/rpm_md/delta_info.rb', line 41 def initialize(filename) super(filename) `applydeltarpm -i '#{filename}'`.each_line do |line| key, value = line.chop.split(':') value.gsub!(/ /, '') @sequence = value if key == "sequence" @sourcerpm = value if key == "source rpm" end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class EnhanceRepo::PackageId
Instance Attribute Details
#sequence ⇒ Object
Returns the value of attribute sequence.
39 40 41 |
# File 'lib/enhance_repo/rpm_md/delta_info.rb', line 39 def sequence @sequence end |
#sourcerpm ⇒ Object
Returns the value of attribute sourcerpm.
39 40 41 |
# File 'lib/enhance_repo/rpm_md/delta_info.rb', line 39 def sourcerpm @sourcerpm end |
Instance Method Details
#eql?(other) ⇒ Boolean
55 56 57 |
# File 'lib/enhance_repo/rpm_md/delta_info.rb', line 55 def eql?(other) ident == other.ident end |
#hash ⇒ Object
51 52 53 |
# File 'lib/enhance_repo/rpm_md/delta_info.rb', line 51 def hash ident.hash end |