Class: Stdout::SingleFile
Defined Under Namespace
Classes: FrameIterator
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #each(&blk) ⇒ Object
-
#initialize(path) ⇒ SingleFile
constructor
A new instance of SingleFile.
Constructor Details
#initialize(path) ⇒ SingleFile
Returns a new instance of SingleFile.
10 11 12 |
# File 'lib/asciinema/stdout.rb', line 10 def initialize(path) @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
8 9 10 |
# File 'lib/asciinema/stdout.rb', line 8 def path @path end |
Instance Method Details
#each(&blk) ⇒ Object
14 15 16 17 18 |
# File 'lib/asciinema/stdout.rb', line 14 def each(&blk) open(path, 'r') do |f| Oj.sc_parse(FrameIterator.new(blk), f) end end |