Class: Browser::Iterable
- Includes:
- Enumerable
- Defined in:
- lib/browser/iterable.rb
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(js_iterable) ⇒ Iterable
constructor
A new instance of Iterable.
Constructor Details
#initialize(js_iterable) ⇒ Iterable
Returns a new instance of Iterable.
5 6 7 |
# File 'lib/browser/iterable.rb', line 5 def initialize js_iterable @js_iterable = js_iterable end |
Instance Method Details
#each ⇒ Object
9 10 11 12 13 |
# File 'lib/browser/iterable.rb', line 9 def each `#@js_iterable.length`.times do |i| yield `#@js_iterable[i]` end end |