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.



758
759
760
761
# File 'lib/rexle.rb', line 758

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

Instance Method Details

#[](i) ⇒ Object



763
764
765
# File 'lib/rexle.rb', line 763

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

#each(&blk) ⇒ Object



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

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

#to_aObject



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

def to_a()     @elements             end