Class: Hudson::Parser::BuildQueueInfo
- Inherits:
-
Object
- Object
- Hudson::Parser::BuildQueueInfo
- Defined in:
- lib/hudson-remote-api/parser/build_queue_info.rb
Instance Attribute Summary collapse
-
#xml ⇒ Object
Returns the value of attribute xml.
-
#xml_doc ⇒ Object
Returns the value of attribute xml_doc.
Instance Method Summary collapse
-
#initialize(raw_xml) ⇒ BuildQueueInfo
constructor
A new instance of BuildQueueInfo.
- #items ⇒ Object
Constructor Details
#initialize(raw_xml) ⇒ BuildQueueInfo
Returns a new instance of BuildQueueInfo.
6 7 8 9 |
# File 'lib/hudson-remote-api/parser/build_queue_info.rb', line 6 def initialize(raw_xml) @xml = raw_xml @xml_doc = REXML::Document.new(raw_xml) end |
Instance Attribute Details
#xml ⇒ Object
Returns the value of attribute xml.
4 5 6 |
# File 'lib/hudson-remote-api/parser/build_queue_info.rb', line 4 def xml @xml end |
#xml_doc ⇒ Object
Returns the value of attribute xml_doc.
4 5 6 |
# File 'lib/hudson-remote-api/parser/build_queue_info.rb', line 4 def xml_doc @xml_doc end |
Instance Method Details
#items ⇒ Object
11 12 13 14 15 |
# File 'lib/hudson-remote-api/parser/build_queue_info.rb', line 11 def items return [] if self.xml_doc.elements["/queue/item"].nil? # there's nothing in the queue self.xml_doc.each_element("/queue/item/task").collect{ |job| job.elements["name"].text } end |