Class: Rexle::Recordset
- Inherits:
-
Array
- Object
- Array
- Rexle::Recordset
- Defined in:
- lib/rexle.rb
Instance Method Summary collapse
- #element(xpath) ⇒ Object
-
#initialize(a) ⇒ Recordset
constructor
A new instance of Recordset.
- #to_doc ⇒ Object
- #xpath(xpath) ⇒ Object
Constructor Details
#initialize(a) ⇒ Recordset
Returns a new instance of Recordset.
1484 1485 1486 |
# File 'lib/rexle.rb', line 1484 def initialize(a) super(a) end |
Instance Method Details
#element(xpath) ⇒ Object
1499 1500 1501 |
# File 'lib/rexle.rb', line 1499 def element(xpath) self.to_doc.root.element(xpath) end |
#to_doc ⇒ Object
1488 1489 1490 1491 1492 1493 |
# File 'lib/rexle.rb', line 1488 def to_doc() recordset = self.map(&:to_a) Rexle.new(['root',{}, *recordset]) end |
#xpath(xpath) ⇒ Object
1495 1496 1497 |
# File 'lib/rexle.rb', line 1495 def xpath(xpath) self.to_doc.root.xpath(xpath) end |