Class: Rexle::Elements

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/rexle.rb

Overview

– end of element –

Instance Method Summary collapse

Constructor Details

#initialize(elements = []) ⇒ Elements

Returns a new instance of Elements.



593
594
595
596
# File 'lib/rexle.rb', line 593

def initialize(elements=[])
  super()
  @elements = elements
end

Instance Method Details

#[](i) ⇒ Object



598
599
600
# File 'lib/rexle.rb', line 598

def [](i)
  @elements[i-1]
end

#each(&blk) ⇒ Object



602
# File 'lib/rexle.rb', line 602

def each(&blk) @elements.each(&blk)  end

#to_aObject



603
# File 'lib/rexle.rb', line 603

def to_a()     @elements             end