Class: NSXMLNode

Inherits:
Object
  • Object
show all
Defined in:
lib/bean/nsxmlnode_additions.rb

Overview

Extensions to the NSXMLNode class

Instance Method Summary collapse

Instance Method Details

#[](key) ⇒ NSXMLNode

Returns the child at the given index.

Parameters:

  • key (Fixnum)

    The child index to retrieve

Returns:

  • (NSXMLNode)

    The node at the given child index.



10
11
12
# File 'lib/bean/nsxmlnode_additions.rb', line 10

def [](key)
  childAtIndex(key)
end

#lengthFixnum

Returns the number of children for this code

Returns:

  • (Fixnum)

    The number of child nodes



18
19
20
# File 'lib/bean/nsxmlnode_additions.rb', line 18

def length
  childCount
end