Sha256: 42a62b8fd46ea798882c65b084a8d12bf1f9be26d2f396fe00acea0701d4a42c
Contents?: true
Size: 387 Bytes
Versions: 12
Compression:
Stored size: 387 Bytes
Contents
require_relative 'element' module Hyalite::DOM class Collection include Native include Enumerable def each(&block) `self.native.length`.times do |i| block.call Element.new(`self.native.item(i)`) end nil end def [](index) Element.new(`self.native.item(index)`) end def length `self.native.length` end end end
Version data entries
12 entries across 12 versions & 1 rubygems