rcv 0.0.2 → 0.0.3
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.
- data/lib/rcv.rb +1 -1
- data/lib/rcv/reader.rb +22 -4
- metadata +2 -2
data/lib/rcv.rb
CHANGED
data/lib/rcv/reader.rb
CHANGED
@@ -57,6 +57,8 @@ module RCV
|
|
57
57
|
attr_reader :name, :readend, :index
|
58
58
|
|
59
59
|
def read; end
|
60
|
+
def set_top; end
|
61
|
+
def set_last; end
|
60
62
|
def next_image; current; end
|
61
63
|
def prev_image; current; end
|
62
64
|
def state; @index; end
|
@@ -72,6 +74,8 @@ module RCV
|
|
72
74
|
@temp.path
|
73
75
|
end
|
74
76
|
|
77
|
+
def current_image; current; end
|
78
|
+
|
75
79
|
def close
|
76
80
|
@readend = false
|
77
81
|
@logger.debug "close : #{@name}"
|
@@ -147,7 +151,10 @@ module RCV
|
|
147
151
|
end
|
148
152
|
current.close if @index > -1 && current
|
149
153
|
@index += 1
|
150
|
-
|
154
|
+
if current
|
155
|
+
current.read
|
156
|
+
current.set_top
|
157
|
+
end
|
151
158
|
return current.next_image if current
|
152
159
|
end
|
153
160
|
|
@@ -157,7 +164,10 @@ module RCV
|
|
157
164
|
end
|
158
165
|
current.close if current
|
159
166
|
@index -= 1
|
160
|
-
|
167
|
+
if current
|
168
|
+
current.read
|
169
|
+
current.set_last
|
170
|
+
end
|
161
171
|
return current.prev_image if current
|
162
172
|
end
|
163
173
|
|
@@ -167,6 +177,7 @@ module RCV
|
|
167
177
|
|
168
178
|
def state=(state)
|
169
179
|
@index = state.shift
|
180
|
+
read
|
170
181
|
current.state = state if state.size > 0
|
171
182
|
end
|
172
183
|
|
@@ -175,12 +186,19 @@ module RCV
|
|
175
186
|
end
|
176
187
|
|
177
188
|
def current_image
|
178
|
-
current.
|
189
|
+
current.current_image
|
179
190
|
end
|
180
191
|
|
181
192
|
def close
|
182
193
|
@temp.close if @temp
|
183
|
-
|
194
|
+
end
|
195
|
+
|
196
|
+
def set_top
|
197
|
+
@index = -1
|
198
|
+
end
|
199
|
+
|
200
|
+
def set_last
|
201
|
+
@index = @entries.size
|
184
202
|
end
|
185
203
|
end
|
186
204
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rcv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kazuki Uchida
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-04-
|
12
|
+
date: 2008-04-26 00:00:00 +09:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|