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 CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  Run the following if you haven't already:
6
6
 
7
- gem sources -a http://gems.github.com
7
+ gem sources -a http://gems.github.com
8
8
 
9
9
  Followed by:
10
10
 
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
- result['-sortorder'] = value
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
- val = self[symbol.to_s]
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
- @laded = false
398
+ @loaded = false
400
399
  end
401
400
 
402
401
  attr_reader :name, :result, :type, :max_repeats, :global
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lardawge-rfm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geoff Coffey