Class: Rexle::Elements
Instance Method Summary collapse
- #[](i) ⇒ Object
- #each(&blk) ⇒ Object
-
#initialize(elements = []) ⇒ Elements
constructor
A new instance of Elements.
- #to_a ⇒ Object
Constructor Details
#initialize(elements = []) ⇒ Elements
Returns a new instance of Elements.
1158 1159 1160 1161 |
# File 'lib/rexle.rb', line 1158 def initialize(elements=[]) super() @elements = elements end |
Instance Method Details
#[](i) ⇒ Object
1163 1164 1165 |
# File 'lib/rexle.rb', line 1163 def [](i) @elements[i-1] end |
#each(&blk) ⇒ Object
1167 |
# File 'lib/rexle.rb', line 1167 def each(&blk) @elements.each(&blk) end |
#to_a ⇒ Object
1168 |
# File 'lib/rexle.rb', line 1168 def to_a() @elements end |