dynarex 1.1.19 → 1.1.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/dynarex.rb +2 -17
  2. metadata +2 -2
@@ -10,27 +10,12 @@ require 'rexle'
10
10
  require 'rexle-builder'
11
11
  require 'rexslt'
12
12
  require 'dynarex-xslt'
13
+ require 'recordx'
13
14
 
14
15
  class Dynarex
15
16
 
16
17
  attr_accessor :format_mask, :delimiter, :xslt_schema, :schema
17
18
 
18
-
19
- class Record
20
-
21
- def initialize(callerx, id, h={})
22
-
23
- @callerx, @id = callerx, id
24
-
25
- methods = h.to_a.map do |k,v|
26
- name, val = k.to_s, v
27
- "def #{name}=(s) @#{name} = s.to_s; @callerx.update(@id, #{name}: s.to_s) end\n\
28
- def #{name}() @#{name} end\n\
29
- @#{name} = '#{val}'"
30
- end
31
- self.instance_eval methods.join("\n")
32
- end
33
- end
34
19
 
35
20
  #Create a new dynarex document from 1 of the following options:
36
21
  #* a local file path
@@ -320,7 +305,7 @@ EOF
320
305
  end
321
306
 
322
307
  def recordx_to_record(recordx)
323
- Record.new(self, recordx.attributes[:id], \
308
+ RecordX.new(self, recordx.attributes[:id], \
324
309
  Hash[*@fields.zip(recordx.xpath("*/text()")).flatten])
325
310
  end
326
311
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: dynarex
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.1.19
5
+ version: 1.1.20
6
6
  platform: ruby
7
7
  authors:
8
8
  - James Robertson
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-04-12 00:00:00 +01:00
13
+ date: 2012-04-15 00:00:00 +01:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency