Class: RCV::Reader
- Inherits:
-
Object
- Object
- RCV::Reader
- Defined in:
- lib/rcv/reader.rb
Instance Method Summary collapse
- #current_image ⇒ Object
-
#initialize(file) ⇒ Reader
constructor
A new instance of Reader.
- #next_image ⇒ Object
- #prev_image ⇒ Object
-
#read ⇒ Object
todo : other archive.
- #state ⇒ Object
- #state=(state) ⇒ Object
Constructor Details
#initialize(file) ⇒ Reader
Returns a new instance of Reader.
14 15 16 |
# File 'lib/rcv/reader.rb', line 14 def initialize(file) @file = file end |
Instance Method Details
#current_image ⇒ Object
32 33 34 |
# File 'lib/rcv/reader.rb', line 32 def current_image @archive.current_image end |
#next_image ⇒ Object
24 25 26 |
# File 'lib/rcv/reader.rb', line 24 def next_image @archive.next_image end |
#prev_image ⇒ Object
28 29 30 |
# File 'lib/rcv/reader.rb', line 28 def prev_image @archive.prev_image end |
#read ⇒ Object
todo : other archive
19 20 21 22 |
# File 'lib/rcv/reader.rb', line 19 def read @archive = Archive::ZipFileEntry.new(nil, @file) @archive.read end |
#state ⇒ Object
36 37 38 |
# File 'lib/rcv/reader.rb', line 36 def state @archive.state.flatten end |
#state=(state) ⇒ Object
40 41 42 |
# File 'lib/rcv/reader.rb', line 40 def state=(state) @archive.state = state end |