Class: M3Uzi::Tag
Constant Summary collapse
- VALID_TAGS =
%w{ALLOW-CACHE}
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/m3uzi/tag.rb', line 4 def name @name end |
#value ⇒ Object
Returns the value of attribute value.
5 6 7 |
# File 'lib/m3uzi/tag.rb', line 5 def value @value end |
Instance Method Details
#format ⇒ Object
16 17 18 19 20 |
# File 'lib/m3uzi/tag.rb', line 16 def format string << "#EXT-X-#{name}" string << ":#{value}" if value string end |
#valid? ⇒ Boolean
22 23 24 25 26 27 28 29 |
# File 'lib/m3uzi/tag.rb', line 22 def valid? case name when 'ALLOW-CACHE' ['YES','NO'].include?(value) else true end end |