Method: M3u8::MapItem.parse

Defined in:
lib/m3u8/map_item.rb

.parse(text) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/m3u8/map_item.rb', line 14

def self.parse(text)
  attributes = parse_attributes(text)
  range_value = attributes['BYTERANGE']
  range = ByteRange.parse(range_value) unless range_value.nil?
  options = { uri: attributes['URI'], byterange: range }
  MapItem.new(options)
end