Sha256: 45f1282dfcc3dead098359fd4ade8d62a1a7179c9df243dcd8a835bd1568d5e9
Contents?: true
Size: 630 Bytes
Versions: 2
Compression:
Stored size: 630 Bytes
Contents
require 'stringio' require 'm3u8/version' require 'm3u8/playlist' require 'm3u8/playlist_item' require 'm3u8/segment_item' require 'm3u8/discontinuity_item' require 'm3u8/key_item' require 'm3u8/media_item' require 'm3u8/session_data_item' require 'm3u8/reader' require 'm3u8/writer' require 'm3u8/error' # M3u8 provides parsing, generation, and validation of m3u8 playlists module M3u8 def parse_attributes(line) array = line.gsub("\n", '').scan(/([A-z-]+)\s*=\s*("[^"]*"|[^,]*)/) Hash[array.map { |key, value| [key, value.gsub('"', '')] }] end def parse_yes_no(value) value == 'YES' ? true : false end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
m3u8-0.5.3 | lib/m3u8.rb |
m3u8-0.5.2 | lib/m3u8.rb |