Class: EnhanceRepo::RpmMd::Data

Inherits:
Object
  • Object
show all
Includes:
Logger
Defined in:
lib/enhance_repo/rpm_md/data.rb

Overview

represents a metadata unit

Instance Method Summary collapse

Methods included from Logger

#log

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_filenameObject



44
45
46
# File 'lib/enhance_repo/rpm_md/data.rb', line 44

def 
  "repodata/#{name}.xml#{should_compress? ? '.gz' : ''}"
end

#nameObject



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

Returns:

  • (Boolean)


49
50
51
# File 'lib/enhance_repo/rpm_md/data.rb', line 49

def should_compress?
  true
end