dynarex 0.8.2 → 0.8.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/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
|