Class: M3u8::KeyItem
- Inherits:
-
Object
- Object
- M3u8::KeyItem
- Extended by:
- M3u8
- Includes:
- Encryptable
- Defined in:
- lib/m3u8/key_item.rb
Overview
KeyItem represents a set of EXT-X-KEY attributes
Constant Summary
Constants included from M3u8
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ KeyItem
constructor
A new instance of KeyItem.
- #to_s ⇒ Object
Methods included from M3u8
intialize_with_byterange, parse_attributes, parse_yes_no
Methods included from Encryptable
#attributes_to_s, #convert_key_names, included
Constructor Details
#initialize(params = {}) ⇒ KeyItem
Returns a new instance of KeyItem.
7 8 9 10 11 12 |
# File 'lib/m3u8/key_item.rb', line 7 def initialize(params = {}) = convert_key_names(params) .merge(params).each do |key, value| instance_variable_set("@#{key}", value) end end |
Class Method Details
Instance Method Details
#to_s ⇒ Object
19 20 21 |
# File 'lib/m3u8/key_item.rb', line 19 def to_s "#EXT-X-KEY:#{attributes_to_s}" end |