Class: Stdout::MultiFile
Instance Attribute Summary collapse
-
#data_path ⇒ Object
readonly
Returns the value of attribute data_path.
-
#timing_path ⇒ Object
readonly
Returns the value of attribute timing_path.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(data_path, timing_path) ⇒ MultiFile
constructor
A new instance of MultiFile.
Constructor Details
#initialize(data_path, timing_path) ⇒ MultiFile
Returns a new instance of MultiFile.
49 50 51 52 |
# File 'lib/asciinema/stdout.rb', line 49 def initialize(data_path, timing_path) @data_path = data_path @timing_path = timing_path end |
Instance Attribute Details
#data_path ⇒ Object (readonly)
Returns the value of attribute data_path.
47 48 49 |
# File 'lib/asciinema/stdout.rb', line 47 def data_path @data_path end |
#timing_path ⇒ Object (readonly)
Returns the value of attribute timing_path.
47 48 49 |
# File 'lib/asciinema/stdout.rb', line 47 def timing_path @timing_path end |
Instance Method Details
#each ⇒ Object
54 55 56 57 58 59 60 |
# File 'lib/asciinema/stdout.rb', line 54 def each File.open(data_path, 'rb') do |file| File.foreach(timing_path) do |line| yield(*delay_and_data_for_line(file, line)) end end end |