Class: RCV::Reader

Inherits:
Object
  • Object
show all
Defined in:
lib/rcv/reader.rb

Instance Method Summary collapse

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_imageObject



32
33
34
# File 'lib/rcv/reader.rb', line 32

def current_image
  @archive.current_image
end

#next_imageObject



24
25
26
# File 'lib/rcv/reader.rb', line 24

def next_image
  @archive.next_image
end

#prev_imageObject



28
29
30
# File 'lib/rcv/reader.rb', line 28

def prev_image
  @archive.prev_image
end

#readObject

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

#stateObject



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