ttml 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/lib/ttml/version.rb +1 -1
  2. data/lib/ttml.rb +2 -1
  3. metadata +1 -1
data/lib/ttml/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ttml
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/lib/ttml.rb CHANGED
@@ -32,7 +32,8 @@ module Ttml
32
32
  # as in xmlns:div/xmlns:p[number(@begin)=>746.63] - any ideas?
33
33
  def subtitle_stream from = 0.0, to = nil
34
34
  to = 99999999999.99 unless to
35
- doc.xpath("/#{ @subs_ns }:tt/#{ @subs_ns }:body/#{ @subs_ns }:div/#{ @subs_ns }:p").select {|n|
35
+ @all_subs ||= doc.xpath("/#{ @subs_ns }:tt/#{ @subs_ns }:body/#{ @subs_ns }:div/#{ @subs_ns }:p")
36
+ @all_subs.select {|n|
36
37
  # puts "Vedo se #{ n['begin'].to_f } >= #{ from } e se #{ n['end'].to_f } <= #{ to }"
37
38
  (n['begin'].to_f >= from) && (n['end'].to_f <= to)
38
39
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ttml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: