m3uzi 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -43,13 +43,18 @@ Set an individual tag value:
43
43
 
44
44
  m3u[:targetduration] = 100
45
45
 
46
- Add a tag to the M3U index:
46
+ Add a tag to the M3U index (custom tags even):
47
47
 
48
48
  m3u.add_tag do |tag|
49
49
  tag.name = "VERSION"
50
50
  tag.value = "1"
51
51
  end
52
52
 
53
+ Add a comment:
54
+
55
+ m3u << "Comment"
56
+ m3u.add_comment("Comment")
57
+
53
58
 
54
59
  NOTES
55
60
  ------
data/lib/m3uzi/tag.rb CHANGED
@@ -6,7 +6,7 @@ class M3Uzi
6
6
  attr_accessor :value
7
7
 
8
8
  def name=(n)
9
- @name = n.to_s.upcase.sub("_", "-")
9
+ @name = n.to_s.upcase.gsub("_", "-")
10
10
  end
11
11
 
12
12
  end
data/lib/m3uzi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class M3Uzi
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
data/lib/m3uzi.rb CHANGED
@@ -100,7 +100,7 @@ class M3Uzi
100
100
  end
101
101
 
102
102
  def [](key)
103
- tag_name = key.to_s.upcase.sub("_", "-")
103
+ tag_name = key.to_s.upcase.gsub("_", "-")
104
104
  obj = tags.detect{|tag| tag.name == tag_name }
105
105
  obj && obj.value
106
106
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: m3uzi
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Brandon Arbini