Sha256: 4f9ccf50010882bbbf4e4f15b81c599d0651485fdeca51310f99f4986c2ccb41

Contents?: true

Size: 517 Bytes

Versions: 9

Compression:

Stored size: 517 Bytes

Contents

module M3u8
  # KeyItem represents a set of EXT-X-SESSION-KEY attributes
  class SessionKeyItem
    include Encryptable
    extend M3u8

    def initialize(params = {})
      options = convert_key_names(params)
      options.merge(params).each do |key, value|
        instance_variable_set("@#{key}", value)
      end
    end

    def self.parse(text)
      attributes = parse_attributes(text)
      SessionKeyItem.new(attributes)
    end

    def to_s
      "#EXT-X-SESSION-KEY:#{attributes_to_s}"
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
m3u8-0.7.0 lib/m3u8/session_key_item.rb
m3u8-0.6.9 lib/m3u8/session_key_item.rb
m3u8-0.6.8 lib/m3u8/session_key_item.rb
m3u8-0.6.7 lib/m3u8/session_key_item.rb
m3u8-0.6.6 lib/m3u8/session_key_item.rb
m3u8-0.6.5 lib/m3u8/session_key_item.rb
m3u8-0.6.4 lib/m3u8/session_key_item.rb
m3u8-0.6.3 lib/m3u8/session_key_item.rb
m3u8-0.6.2 lib/m3u8/session_key_item.rb