Class: Browser::Element::TimeRanges
- Includes:
- Enumerable
- Defined in:
- lib/browser/element/media.rb
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(native) ⇒ TimeRanges
constructor
A new instance of TimeRanges.
- #to_n ⇒ Object
Constructor Details
#initialize(native) ⇒ TimeRanges
Returns a new instance of TimeRanges.
50 51 52 |
# File 'lib/browser/element/media.rb', line 50 def initialize native @native = native end |
Instance Method Details
#each ⇒ Object
58 59 60 61 62 63 64 |
# File 'lib/browser/element/media.rb', line 58 def each `#@native.length`.times do |i| yield TimeRange.new(`#@native.start(i)`, `#@native.end(i)`) end self end |
#to_n ⇒ Object
54 55 56 |
# File 'lib/browser/element/media.rb', line 54 def to_n @native end |