polyrex-object-methods 0.1.2 → 0.2.0

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: 6f785f1350b1d5b6c2b507dfc67cac326e18af0d
4
- data.tar.gz: 4b43d89edc2480aa9c11fa28729cb27bf1e7bd64
3
+ metadata.gz: 92e4a8ac628a0eb89fbb97945e59267c4ff9294d
4
+ data.tar.gz: d58d43af0ba50fc6c610fc2ebdeaa5d20cdd8e4f
5
5
  SHA512:
6
- metadata.gz: 386bba015f3aad12b02a8fc072149d43b46184c41883a04553c4b8bc75c95f7f57ed1781c9380e893ba8476e4dd10975d3dc3f5bcc00033bef9b09fa64e384b9
7
- data.tar.gz: b2b1c36d4cf555477830cd7afbb994abfdc17e3d760c66d70666471958066d1adbf6771523b44194da4ee60c395b07015e3fd88c4d1df31afb16b8b930335e72
6
+ metadata.gz: 3e9f9bb8d3a5e872df6873d726289c3055c6cd90faa85ab31a6968d738dd423f120832ae401caf18ce3676332d73c77ed6e808a11b18bb7c7051115f61cd971f
7
+ data.tar.gz: 56b553d98d32ed1ce88599bf7ce2e179b142226c7f4f37339807960ddda9e2890e156cbd113784a35fff6e12c7c6ca64c4a105b01171aa626acce7e3e3e36c98
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,4 +1,4 @@
1
- #!/usr/bin/ruby
1
+ #!/usr/bin/env ruby
2
2
 
3
3
  # file: polyrex-object-methods.rb
4
4
 
@@ -9,13 +9,26 @@ class PolyrexObjectMethods
9
9
  a = schema.split('/')
10
10
  a.shift
11
11
 
12
- @a = a.map do |x|
12
+ to_array = ->(x) do
13
13
  name, raw_fields = x.split('[')
14
- [name.capitalize, raw_fields ? raw_fields.chop.split(',').map(&:strip) : []]
14
+ [name.capitalize, raw_fields ? raw_fields.chop.split(',')\
15
+ .map(&:strip) : []]
15
16
  end
17
+
18
+ @a = a.inject([]) do |r,x|
19
+
20
+ siblings = x[/[^\{]+(?=\})/]
21
+
22
+ if siblings then
23
+ siblings.split(/\s*;\s*/).each {|s| r << to_array.call(s) }
24
+ else
25
+ r << to_array.call(x)
26
+ end
27
+ end
28
+
16
29
  end
17
30
 
18
31
  def to_a
19
32
  @a
20
33
  end
21
- end
34
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polyrex-object-methods
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -10,26 +10,28 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDRDCCAiygAwIBAgIBADANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
13
+ MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
14
14
  YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
15
- 8ixkARkWAmV1MB4XDTEzMDIwNjIxMDExM1oXDTE0MDIwNjIxMDExM1owSDESMBAG
15
+ 8ixkARkWAmV1MB4XDTE0MDcyMDA0MTU0MFoXDTE1MDcyMDA0MTU0MFowSDESMBAG
16
16
  A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
17
17
  EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
18
- ggEBAKIIupwmZTIxZe0acpHkRlp8pfd4p7CawgyVBO9aJ5Vc6GIlQ3E2kKYEGeR7
19
- 3lN5EVKhCIRslUD2vC+JxlNMue1i+c2uj7RNydfqeIMZFLt7TT9jprQvWEAcGJA2
20
- xJnXTfYw0qo+BpNYriYoITdLKyrKXpgjqGOlK4rrF9rygrPdBg/HSvc9tYf8fY5h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1Ud
24
+ DwQEAwIEsDAdBgNVHQ4EFgQUsHsnkV+5WwXtQLT/SK+QXeLoUmowJgYDVR0RBB8w
25
+ HYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0c29uLmV1MCYGA1UdEgQfMB2BG2dlbW1h
26
+ c3RlckBqYW1lc3JvYmVydHNvbi5ldTANBgkqhkiG9w0BAQUFAAOCAQEAXq5yhiRg
27
+ 6l2PaYMXreERiyr5xW15UgYf7grS52zzsELKSt5h1ilooplDglNFnzfzOJwJ7hHn
28
+ nfjOiw7okyZhoJKihco7m+gP/HaZIFHw6n6habYyN0NLd5m7xyFeaBPXzGeJLzOU
29
+ jZYqwl4f5tgRDt2dZd3I1RGZuw9RVPtEk6+tUke+xUjN+7Z35x6kmOkjG9MKNEuX
30
+ ea96lRJkz8IddpbKU8oZhuNZI3s4BbHRGcckyAA1qtMZec5zh03ZnhD21O/LjLTM
31
+ d7+vhYqYpERASTxH9VrAYLVFg6y6r7dxraNSCySdPmh1Vcn9ukRIP7AK6XpthnVR
32
+ wjqolFx+GqkWWA==
31
33
  -----END CERTIFICATE-----
32
- date: 2013-07-27 00:00:00.000000000 Z
34
+ date: 2014-07-20 00:00:00.000000000 Z
33
35
  dependencies: []
34
36
  description:
35
37
  email: james@r0bertson.co.uk
@@ -48,18 +50,19 @@ require_paths:
48
50
  - lib
49
51
  required_ruby_version: !ruby/object:Gem::Requirement
50
52
  requirements:
51
- - - '>='
53
+ - - ">="
52
54
  - !ruby/object:Gem::Version
53
- version: '0'
55
+ version: 2.1.0
54
56
  required_rubygems_version: !ruby/object:Gem::Requirement
55
57
  requirements:
56
- - - '>='
58
+ - - ">="
57
59
  - !ruby/object:Gem::Version
58
60
  version: '0'
59
61
  requirements: []
60
62
  rubyforge_project:
61
- rubygems_version: 2.0.0.rc.2
63
+ rubygems_version: 2.2.2
62
64
  signing_key:
63
65
  specification_version: 4
64
66
  summary: polyrex-object-methods
65
67
  test_files: []
68
+ has_rdoc:
metadata.gz.sig CHANGED
Binary file