dynarex 0.6.5 → 0.6.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dynarex.rb +2 -0
- metadata +1 -1
data/lib/dynarex.rb
CHANGED
@@ -67,6 +67,7 @@ EOF
|
|
67
67
|
t = format_mask.to_s.gsub(/\[!(\w+)\]/, '(.*)').sub(/\[/,'\[').sub(/\]/,'\]')
|
68
68
|
lines = buffer.split(/\r?\n|\r(?!\n)/).map {|x|x.match(/#{t}/).captures}
|
69
69
|
fields = format_mask.scan(/\[!(\w+)\]/).flatten.map(&:to_sym)
|
70
|
+
@default_key ||= fields[0]
|
70
71
|
|
71
72
|
a = lines.map do|x|
|
72
73
|
created = Time.now.to_s
|
@@ -204,6 +205,7 @@ EOF
|
|
204
205
|
end
|
205
206
|
|
206
207
|
@default_key = fields[0]
|
208
|
+
@record_name = record_name
|
207
209
|
@records = {}
|
208
210
|
@flat_records = {}
|
209
211
|
|