mediainfo-native 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 06fd52124761e84c1222c731df80656b677b643a
4
- data.tar.gz: 0f27fc60cc3e1ac4d6b373c989e726a14d01fb2d
3
+ metadata.gz: deb070465a56268298ad45f0f854997196d162e6
4
+ data.tar.gz: 6dbe4aa2682190fdd9c4f4934dcc7f5a2900b4a8
5
5
  SHA512:
6
- metadata.gz: a7b8c26095d6deb9dea6c249f805c83827cbaec1a378b73a3e1dda8b747b387647571caa2a278bc12bd1191ee912059a947b786f0a65fe243022ee8b148f90a7
7
- data.tar.gz: d925deb47da919642b27ccb70c537c1fba5804bbbb11993775d319c5d656ebc4f138718ba50e341be3291f1a42e5373c5ad7ccd04fb952df8755c8db5a976505
6
+ metadata.gz: 2eb9b24e16cc85013cd97563228d9d84e35ccf1147a426ac39659ff2bb73ef7d1987847b6476a2a54bd93a8814bf845e2a9ef00f66d2b090b9486201c3434b42
7
+ data.tar.gz: d9961fac0f448e6c92afa7ec8281dfd93a0362973b5dedda52bea69dec8021588706b4778e9a4efab9521d2f397a8836d7b9063d50015c9b0ab2b51828f4921c
@@ -14,6 +14,12 @@ module MediaInfoNative
14
14
  def method_missing(meth, *args, &block)
15
15
  self.general.send(meth, *args, &block)
16
16
  end
17
+
18
+ [:video, :audio, :image].each do |t|
19
+ define_method "#{t}?" do
20
+ self.send(t).count > 0
21
+ end
22
+ end
17
23
  end
18
24
 
19
25
  class StreamProxy
@@ -29,12 +35,12 @@ module MediaInfoNative
29
35
  def count; @streams.size; end
30
36
 
31
37
  def method_missing(m, *a, &b)
32
- case streams.size
38
+ case @streams.size
33
39
  when 0
34
40
  raise NoStreamsForProxyError
35
41
  when 1
36
- if streams.first.respond_to?(m)
37
- streams.first.send(m, *a, &b)
42
+ if @streams.first.respond_to?(m)
43
+ @streams.first.send(m, *a, &b)
38
44
  else
39
45
  raise UnknownAttributeError
40
46
  end
@@ -1,3 +1,3 @@
1
1
  module MediaInfoNative
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mediainfo-native
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - FlavourSys Technology GmbH