recordx 0.1.16 → 0.1.18

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fb38104cb38491761b5fdf8d3ee8032cda26ca34
4
- data.tar.gz: 75e2db97795497d4cca70002476e34332c78e648
3
+ metadata.gz: aed9289415baaab195ceb86b2ab400cd80e18b1f
4
+ data.tar.gz: df012636f7432c02a202fa7fff111d6b114022eb
5
5
  SHA512:
6
- metadata.gz: d132a9afee98e3eb86a5510b102225a7e90039a955792eb77ff95985daecc99aa42df0c57633d516d6cf115fb82564cb9b8e9d162fc12a31243a88100d37ce63
7
- data.tar.gz: 0483b831e509ffa399c9952b4c7bb791cc59ece280b6d83d1bc237c057e9c2a3a302fe52f2cf818bd5c523dc302fb7d2e6078d709cabee16cbb7e5181bacb8a6
6
+ metadata.gz: 4e9ec934f2693de8edb330511f7d6edcbc1b42fab40700205604463cb8e5ca0c3903aa01fd836b11f6929d882e232735973791ee0683ec54c01ce4046090cfe8
7
+ data.tar.gz: ec97c6cc4a8bde7d364748ca6086b1873a62d72cba0a735cc782c14976bb1b451873acb8115078b2ffc755672fb039fd521b81d86518b63ab46089220f941eb3
checksums.yaml.gz.sig CHANGED
@@ -1,4 +1,3 @@
1
- ����T��{��o��iH��?8�6�4��q@���� x4�
2
-
3
- �>���[�<�'plD*�!j/�ѫ���Î;�dH7,�N�}5�˜!4�e��#S4&s��|)�{�X;�0ok�_��L�E�kd�4� �1��E�A:�Wb��M��e�~�Ũ��������[��&��>
4
- (�ZM��J3ˆ�>&���8(�a�,�WW���Sݞ�����+�u�Wk�,
1
+ j�b��&�ĝ�d^bk�\��?�'�k5��U|ب�Z"��"ȘD�G�(c�2
2
+ �;,�0��4�nǮZ�H�кE��h�J&���&Ό��3{�c�R�z>��� o"|����;4{�3Z;���|+�j�"7l�'�Қ��,u�Ղ5Yp�NH�B�Nu+�
3
+
data/lib/recordx.rb CHANGED
@@ -24,12 +24,21 @@ class RecordX
24
24
 
25
25
  def initialize(x=nil, callerx=nil, id=nil )
26
26
 
27
- h = if x.is_a? Hash then
27
+ h = if x.is_a? Hash then x
28
+
28
29
  x
29
- elsif x.is_a? Array and x.first.is_a? Rexle::Element then
30
- x.inject({}) {|r,y| r.merge(y.name.to_sym => y.text.unescape)}
30
+
31
+ elsif x.is_a? Array then
32
+
33
+ x.inject({}) do |r,y|
34
+ val = y.text.is_a?(String) ? y.text.unescape : ''
35
+ r.merge(y.name.to_sym => val)
36
+ end
37
+
31
38
  else
39
+
32
40
  x
41
+
33
42
  end
34
43
 
35
44
  @callerx, @id = callerx, id
@@ -53,7 +62,7 @@ class RecordX
53
62
  end
54
63
 
55
64
  def inspect()
56
- "#<RecordX:%s>" % [self.object_id]
65
+ "#<RecordX:%s @h=%s>" % [self.object_id, @h]
57
66
  end
58
67
 
59
68
  alias to_h h
@@ -100,4 +109,4 @@ class RecordX
100
109
  @#{name} = %{#{val}}}
101
110
  end
102
111
 
103
- end
112
+ 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.1.16
4
+ version: 0.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  g/vV/A8D1m4ZGF1z7lQzfOsK5R3XRIJ6zJRYEtb1xhRDDpaYlAPTZloddBDAGxec
32
32
  p6U4INBFsda75Q==
33
33
  -----END CERTIFICATE-----
34
- date: 2015-02-25 00:00:00.000000000 Z
34
+ date: 2015-03-01 00:00:00.000000000 Z
35
35
  dependencies: []
36
36
  description:
37
37
  email: james@r0bertson.co.uk
metadata.gz.sig CHANGED
Binary file