recordx 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/recordx.rb +24 -1
- data.tar.gz.sig +0 -0
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74766ffa2e21149903727906188606aa33f11b39
|
4
|
+
data.tar.gz: 10ac1ce43ac9c90f2533cba756cd904eeb9eef67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1643799bd93bb93ef24f5c62d4d4a2dac70ee915a95a7f65a2e72f03fa2fc74a29d1fd5e2ad93cb53bbb4169d4a05b6cb8b6a3c6930b626c0e65696b8d3d4248
|
7
|
+
data.tar.gz: 176acdf2c41631c6a1103040596982f55e6d76f9169af801e22fd2518fc208ae4d11f84a3faf67d3cf1c51a50d26c301c6364ced75c2b041d659d526ce5c944e
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/recordx.rb
CHANGED
@@ -45,6 +45,7 @@ class RecordX
|
|
45
45
|
created, last_modified
|
46
46
|
@h = RXHash.new(self).merge h
|
47
47
|
h.each {|name,val| attr_accessor2(name.to_s, val) }
|
48
|
+
|
48
49
|
end
|
49
50
|
|
50
51
|
def [](k) @h[k] end
|
@@ -67,6 +68,28 @@ class RecordX
|
|
67
68
|
end
|
68
69
|
|
69
70
|
alias to_h h
|
71
|
+
|
72
|
+
def to_html(xslt: '')
|
73
|
+
|
74
|
+
# This method is expected to be used within Dynarex
|
75
|
+
|
76
|
+
kvx = self.to_kvx
|
77
|
+
|
78
|
+
xsl_buffer = RXFHelper.read(xslt).first
|
79
|
+
xslt = Nokogiri::XSLT(xsl_buffer)
|
80
|
+
xslt.transform(Nokogiri::XML(kvx.to_xml)).to_s
|
81
|
+
|
82
|
+
end
|
83
|
+
|
84
|
+
def to_kvx()
|
85
|
+
|
86
|
+
kvx = Kvx.new(@h.to_h)
|
87
|
+
summary_fields = @callerx.summary.keys - [:recordx_type, \
|
88
|
+
:format_mask, :schema, :default_key]
|
89
|
+
summary_fields.each {|field| kvx.summary[field] = @callerx.summary[field] }
|
90
|
+
kvx
|
91
|
+
|
92
|
+
end
|
70
93
|
|
71
94
|
def update(h)
|
72
95
|
h.each {|name,value| self.method((name.to_s + '=').to_sym).call(value) }
|
@@ -114,4 +137,4 @@ class RecordX
|
|
114
137
|
|
115
138
|
end
|
116
139
|
|
117
|
-
end
|
140
|
+
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: recordx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
AUf83m/FAQuM1QqHmmadyxeL0KB1GISpCURZ0bn5HkDnJipCM3nwcHTxOpqLMlst
|
32
32
|
cb3TqEykWFs+mA==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2015-
|
34
|
+
date: 2015-10-29 00:00:00.000000000 Z
|
35
35
|
dependencies: []
|
36
36
|
description:
|
37
37
|
email: james@r0bertson.co.uk
|
@@ -60,7 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
60
60
|
version: '0'
|
61
61
|
requirements: []
|
62
62
|
rubyforge_project:
|
63
|
-
rubygems_version: 2.4.
|
63
|
+
rubygems_version: 2.4.8
|
64
64
|
signing_key:
|
65
65
|
specification_version: 4
|
66
66
|
summary: A kind of Hash which can also use accessor methods to store or retrieve values.
|
metadata.gz.sig
CHANGED
Binary file
|