Class: Nokogiri::XML::Element
- Inherits:
-
Object
- Object
- Nokogiri::XML::Element
- Defined in:
- lib/ruic/presentation.rb
Instance Method Summary collapse
-
#index(kind = '*') ⇒ Object
Find the index of this element amongs its siblings.
Instance Method Details
#index(kind = '*') ⇒ Object
Find the index of this element amongs its siblings
359 360 361 |
# File 'lib/ruic/presentation.rb', line 359 def index(kind='*') # Find the index of this element amongs its siblings xpath("count(./preceding-sibling::#{kind})").to_i end |