polyrex 0.8.0 → 0.8.1
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/polyrex.rb +4 -1
- metadata +2 -2
data/lib/polyrex.rb
CHANGED
|
@@ -36,7 +36,9 @@ class Polyrex
|
|
|
36
36
|
@doc.to_s(options)
|
|
37
37
|
end
|
|
38
38
|
|
|
39
|
-
def save(filepath)
|
|
39
|
+
def save(filepath=nil)
|
|
40
|
+
filepath ||= @local_filepath
|
|
41
|
+
@local_filepath = filepath
|
|
40
42
|
File.open(filepath,'w'){|f| @doc.write f}
|
|
41
43
|
end
|
|
42
44
|
|
|
@@ -201,6 +203,7 @@ class Polyrex
|
|
|
201
203
|
buffer = Kernel.open(s, 'UserAgent' => 'Polyrex-Reader').read
|
|
202
204
|
else # local file
|
|
203
205
|
buffer = File.open(s,'r').read
|
|
206
|
+
@local_filepath = s
|
|
204
207
|
end
|
|
205
208
|
|
|
206
209
|
@doc = Rexle.new buffer
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: polyrex
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.8.
|
|
4
|
+
version: 0.8.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors: []
|
|
7
7
|
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2011-01-
|
|
12
|
+
date: 2011-01-15 00:00:00 +00:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|