class YumRepo::Package
Public Class Methods
new(xml)
click to toggle source
# File lib/yumrepo.rb, line 227 def initialize(xml) @xml = xml end
Public Instance Methods
description()
click to toggle source
# File lib/yumrepo.rb, line 243 def description doc.xpath('/xmlns:package/xmlns:description').text.strip end
doc()
click to toggle source
# File lib/yumrepo.rb, line 231 def doc @doc ||= Nokogiri::XML(@xml) end
group()
click to toggle source
# File lib/yumrepo.rb, line 267 def group doc.xpath('/xmlns:package/xmlns:format/rpm:group').text.strip end
license()
click to toggle source
# File lib/yumrepo.rb, line 275 def license doc.xpath('/xmlns:package/xmlns:format/rpm:license').text.strip end
location()
click to toggle source
# File lib/yumrepo.rb, line 251 def location doc.xpath('/xmlns:package/xmlns:location/@href').text.strip end
name()
click to toggle source
# File lib/yumrepo.rb, line 235 def name doc.xpath('/xmlns:package/xmlns:name').text.strip end
provides()
click to toggle source
# File lib/yumrepo.rb, line 279 def provides doc.xpath('/xmlns:package/xmlns:format/rpm:provides/rpm:entry').map do |pr| { :name => pr.at_xpath('./@name').text.strip } end end
release()
click to toggle source
# File lib/yumrepo.rb, line 259 def release doc.xpath('/xmlns:package/xmlns:version/@rel').text.strip end
requires()
click to toggle source
# File lib/yumrepo.rb, line 287 def requires doc.xpath('/xmlns:package/xmlns:format/rpm:requires/rpm:entry').map do |pr| { :name => pr.at_xpath('./@name').text.strip } end end
src_rpm()
click to toggle source
# File lib/yumrepo.rb, line 263 def src_rpm doc.xpath('/xmlns:package/xmlns:format/rpm:sourcerpm').text.strip end
summary()
click to toggle source
# File lib/yumrepo.rb, line 239 def summary doc.xpath('/xmlns:package/xmlns:summary').text.strip end
url()
click to toggle source
# File lib/yumrepo.rb, line 247 def url doc.xpath('/xmlns:package/xmlns:url').text.strip end
vendor()
click to toggle source
# File lib/yumrepo.rb, line 271 def vendor doc.xpath('/xmlns:package/xmlns:format/rpm:vendor').text.strip end
version()
click to toggle source
# File lib/yumrepo.rb, line 255 def version doc.xpath('/xmlns:package/xmlns:version/@ver').text.strip end