Class: M3u8::SessionKeyItem

Inherits:
Object
  • Object
show all
Extended by:
M3u8
Includes:
Encryptable, Serializable
Defined in:
lib/m3u8/session_key_item.rb

Overview

SessionKeyItem represents EXT-X-SESSION-KEY attributes

Constant Summary

Constants included from M3u8

VERSION

Instance Attribute Summary

Attributes included from Encryptable

#iv, #key_format, #key_format_versions, #method, #uri

Class Method Summary collapse

Instance Method Summary collapse

Methods included from M3u8

initialize_with_byterange, parse_attributes, parse_float, parse_int, parse_yes_no, to_yes_no

Methods included from Serializable

#as_json, serialize, #to_h, #to_json

Methods included from Encryptable

#attributes_to_s, #convert_key_names, included, #initialize

Methods included from AttributeFormatter

#boolean_format, #decimal_format, #quoted_format, #unquoted_format

Class Method Details

.parse(text) ⇒ SessionKeyItem

Parse an EXT-X-SESSION-KEY tag.

Parameters:

  • text (String)

    raw tag line

Returns:



13
14
15
16
# File 'lib/m3u8/session_key_item.rb', line 13

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

Instance Method Details

#to_sString

Render as an m3u8 EXT-X-SESSION-KEY tag.

Returns:

  • (String)


20
21
22
# File 'lib/m3u8/session_key_item.rb', line 20

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