Class: VCDOM::NodeList
- Inherits:
-
Object
- Object
- VCDOM::NodeList
- Includes:
- Enumerable
- Defined in:
- lib/vcdom/node_list.rb
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(nodes) ⇒ NodeList
constructor
A new instance of NodeList.
- #inspect ⇒ Object
- #item(index) ⇒ Object
- #length ⇒ Object
Constructor Details
#initialize(nodes) ⇒ NodeList
Returns a new instance of NodeList.
10 11 12 |
# File 'lib/vcdom/node_list.rb', line 10 def initialize( nodes ) @nodes = nodes end |
Instance Method Details
#each ⇒ Object
19 20 21 22 23 |
# File 'lib/vcdom/node_list.rb', line 19 def each @nodes.each do |n| yield n end end |
#inspect ⇒ Object
25 26 27 |
# File 'lib/vcdom/node_list.rb', line 25 def inspect "#<VCXML::DOM::NodeList>" end |
#item(index) ⇒ Object
13 14 15 |
# File 'lib/vcdom/node_list.rb', line 13 def item( index ) @nodes[index] end |
#length ⇒ Object
16 17 18 |
# File 'lib/vcdom/node_list.rb', line 16 def length @nodes.length end |