Class: EnhanceRepo::RpmMd::Data
- Inherits:
-
Object
- Object
- EnhanceRepo::RpmMd::Data
- Includes:
- Logger
- Defined in:
- lib/enhance_repo/rpm_md/data.rb
Overview
represents a metadata unit
Direct Known Subclasses
DeltaInfo, FileLists, Index, Other, Patterns, Primary, Products, SuseData, SuseInfo, UpdateInfo
Instance Method Summary collapse
-
#initialize(name) ⇒ Data
constructor
initialize the extra data with a name or use the class name as default.
- #metadata_filename ⇒ Object
- #name ⇒ Object
-
#should_compress? ⇒ Boolean
wether the metadata should be compressed.
Methods included from Logger
Constructor Details
#initialize(name) ⇒ Data
initialize the extra data with a name or use the class name as default
36 37 38 |
# File 'lib/enhance_repo/rpm_md/data.rb', line 36 def initialize(name) @name = name end |
Instance Method Details
#metadata_filename ⇒ Object
44 45 46 |
# File 'lib/enhance_repo/rpm_md/data.rb', line 44 def "repodata/#{name}.xml#{should_compress? ? '.gz' : ''}" end |
#name ⇒ Object
40 41 42 |
# File 'lib/enhance_repo/rpm_md/data.rb', line 40 def name defined?(@name) ? @name : self.class.to_s.split('::').last.downcase end |
#should_compress? ⇒ Boolean
wether the metadata should be compressed
49 50 51 |
# File 'lib/enhance_repo/rpm_md/data.rb', line 49 def should_compress? true end |