dynarex 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dynarex.rb +4 -0
- metadata +1 -1
data/lib/dynarex.rb
CHANGED
@@ -175,6 +175,7 @@ EOF
|
|
175
175
|
end
|
176
176
|
|
177
177
|
def sort_by!(&element_blk)
|
178
|
+
refresh_doc
|
178
179
|
a = XPath.match(@doc.root, 'records/*').sort_by &element_blk
|
179
180
|
records = XPath.first(@doc.root, 'records')
|
180
181
|
records.parent.delete records
|
@@ -232,10 +233,13 @@ EOF
|
|
232
233
|
end
|
233
234
|
end
|
234
235
|
|
236
|
+
@doc = Document.new buffer
|
235
237
|
buffer
|
236
238
|
|
237
239
|
end
|
238
240
|
|
241
|
+
alias refresh_doc display_xml
|
242
|
+
|
239
243
|
def dynarex_new(s)
|
240
244
|
ptrn = %r((\w+)\[?([^\]]+)?\]?\/(\w+)\(([^\)]+)\))
|
241
245
|
root_name, raw_summary, record_name, raw_fields = s.match(ptrn).captures
|