lib/m3u8/playlist.rb in m3u8-0.3.2 vs lib/m3u8/playlist.rb in m3u8-0.4.0

- old
+ new

@@ -1,8 +1,10 @@ module M3u8 + # Playlist represents an m3u8 playlist, it can be a master playlist or a set + # of media segments class Playlist - attr_accessor :items, :version, :cache, :target, :sequence + attr_accessor :items, :version, :cache, :target, :sequence, :type def initialize(options = {}) assign_options options self.items = [] end @@ -58,9 +60,10 @@ self.version = options[:version] self.sequence = options[:sequence] self.cache = options[:cache] self.target = options[:target] + self.type = options[:type] end def playlist_size items.select { |item| item.is_a?(PlaylistItem) }.size end