polyrex-links 0.3.1 → 0.3.2

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
  SHA256:
3
- metadata.gz: 4bd12c77d61cf0b1cfc72812388fb6905dea692dd47b2a15f4552658fd251026
4
- data.tar.gz: d1f62513696b431a28a0402f4108659e476d49df785f8e0ad9459cf7880a869d
3
+ metadata.gz: 3195deb3e835d3551fcfa47a178a0665340e704674753a006293d586c2bd3a70
4
+ data.tar.gz: 75297f0afa0dd7b8dc9a317d7ef8bbd00c29d41a509a41a6279929a88f887b39
5
5
  SHA512:
6
- metadata.gz: 3b28beb444c7984ab881c4edbbe44c27fdd932e791f29b2f3f6c24606dfb43c84aff74a8b98975ed896d50aa243eccbd9a3138b3f25765654ceb79bff13d3b8a
7
- data.tar.gz: 888c6e76766752725df3d205c3e582128aa77da82bb3e73319a0f74f52a2c0c7106cc1673dffa1ec4ee2df4dae2ead77015ad8ca462afa9e044ebf0dae13376f
6
+ metadata.gz: 05d4a307e3a4393171ffd1f678c00e91607a3165857845c83e61217c99763260e454e2e8a9d53b3997e4943cb81033a3a6a33886c16cb1fd11c93559ef865721
7
+ data.tar.gz: 338fae386a335997ec904b8082ec53ab34a33156b41a9a825b1040b42fb4579470b72686cee6ea071b4ab8e4b7dff047b3aa3b185e5b6f301b1845b22cfc05d1
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/polyrex-links.rb CHANGED
@@ -12,6 +12,19 @@ class PolyrexLinks < Polyrex
12
12
  @debug = debug
13
13
  end
14
14
 
15
+ def find(s)
16
+
17
+ found = find_by_link_name s
18
+
19
+ if found then
20
+
21
+ path = backtrack_path found
22
+ [locate(path.join('/')), path.join('/')]
23
+
24
+ end
25
+
26
+ end
27
+
15
28
  # Returns the Polyrex element for the given path
16
29
  #
17
30
  def link(s)
@@ -61,6 +74,14 @@ class PolyrexLinks < Polyrex
61
74
 
62
75
  private
63
76
 
77
+ def backtrack_path(e, a5=[])
78
+
79
+ backtrack_path(e.parent, a5) if e.parent?
80
+ a5 << e.name
81
+
82
+ return a5
83
+ end
84
+
64
85
 
65
86
  def each_link()
66
87
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polyrex-links
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,28 +35,28 @@ cert_chain:
35
35
  5x/50O2gHQvmLgSVk8EsWqPZ6B8tMZ9h/ttCIkW33ewCmHrrxH9suuyqbC/SaiEf
36
36
  2qE86MpuEcgDiX59WiP5GiBx
37
37
  -----END CERTIFICATE-----
38
- date: 2021-02-27 00:00:00.000000000 Z
38
+ date: 2021-05-24 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: polyrex
42
42
  requirement: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: 1.2.0
47
44
  - - "~>"
48
45
  - !ruby/object:Gem::Version
49
46
  version: '1.2'
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: 1.2.0
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- version: 1.2.0
57
54
  - - "~>"
58
55
  - !ruby/object:Gem::Version
59
56
  version: '1.2'
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: 1.2.0
60
60
  description:
61
61
  email: james@jamesrobertson.eu
62
62
  executables: []
@@ -83,8 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
83
  - !ruby/object:Gem::Version
84
84
  version: '0'
85
85
  requirements: []
86
- rubyforge_project:
87
- rubygems_version: 2.7.10
86
+ rubygems_version: 3.1.2
88
87
  signing_key:
89
88
  specification_version: 4
90
89
  summary: A convenient gem for retrieving a link from a hierarchical lookup table from
metadata.gz.sig CHANGED
Binary file