lardawge-rfm 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -1
- data/lib/rfm_command.rb +10 -1
- data/lib/rfm_result.rb +2 -3
- metadata +1 -1
data/README.rdoc
CHANGED
data/lib/rfm_command.rb
CHANGED
@@ -239,7 +239,16 @@ module Rfm
|
|
239
239
|
result["-sortfield.1"] = value
|
240
240
|
end
|
241
241
|
when :sort_order:
|
242
|
-
|
242
|
+
if value.kind_of? Array
|
243
|
+
if value.size > 9
|
244
|
+
raise Rfm::Error::ParameterError.new(":sort_order can have at most 9 fields, but you passed an array with #{value.size} elements.")
|
245
|
+
end
|
246
|
+
value.each_index {|i|
|
247
|
+
result["-sortorder.#{i+1}"] = value[i]
|
248
|
+
}
|
249
|
+
else
|
250
|
+
result["-sortorder.1"] = value
|
251
|
+
end
|
243
252
|
when :post_script:
|
244
253
|
if value.class == Array
|
245
254
|
result['-script'] = value[0]
|
data/lib/rfm_result.rb
CHANGED
@@ -310,8 +310,7 @@ module Rfm::Result
|
|
310
310
|
|
311
311
|
def method_missing (symbol, *attrs)
|
312
312
|
# check for simple getter
|
313
|
-
|
314
|
-
return val if val != nil
|
313
|
+
return self[symbol.to_s] if self.include?(symbol.to_s)
|
315
314
|
|
316
315
|
# check for setter
|
317
316
|
symbol_name = symbol.to_s
|
@@ -396,7 +395,7 @@ module Rfm::Result
|
|
396
395
|
@max_repeats = field.attributes['max-repeats']
|
397
396
|
@global = field.attributes['global']
|
398
397
|
|
399
|
-
@
|
398
|
+
@loaded = false
|
400
399
|
end
|
401
400
|
|
402
401
|
attr_reader :name, :result, :type, :max_repeats, :global
|