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.
1157 1158 1159 1160 |
# File 'lib/rexle.rb', line 1157 def initialize(elements=[]) super() @elements = elements end |
Instance Method Details
#[](i) ⇒ Object
1162 1163 1164 |
# File 'lib/rexle.rb', line 1162 def [](i) @elements[i-1] end |
#each(&blk) ⇒ Object
1166 |
# File 'lib/rexle.rb', line 1166 def each(&blk) @elements.each(&blk) end |
#to_a ⇒ Object
1167 |
# File 'lib/rexle.rb', line 1167 def to_a() @elements end |