mementus 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/mementus.rb +1 -0
- data/lib/mementus/graph.rb +1 -1
- data/lib/mementus/node_proxy.rb +1 -1
- data/lib/mementus/structure/incidence_list.rb +16 -10
- data/lib/mementus/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 223874927cc970ab0f6649817e5e43d2d8e95603df9bb26ac3a7b911ce3b8599
|
4
|
+
data.tar.gz: 5f9fc630c6bc787ba209be9696a1e0fb961e0a1deaf349d4912e56ea12bc2e65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88591917460dd9a4ba48115741612b89553b3ec871b1e782aefbe471f7fa210f12c67f027f4d89e7e8dbe93739c4f20c699af635fbb89e7343a023eb3dac4143
|
7
|
+
data.tar.gz: d09e3a0b83523b5d4210802ecfd4f4001768ee596cbb53e626564d40580834673eb520931a189c3855f2a1e4845f406a483cbbc61d4a5a0b13ed648c955d88fc
|
data/lib/mementus.rb
CHANGED
@@ -6,6 +6,7 @@ require 'mementus/structure/adjacency_list'
|
|
6
6
|
require 'mementus/structure/incidence_list'
|
7
7
|
require 'mementus/node'
|
8
8
|
require 'mementus/edge'
|
9
|
+
require 'mementus/criteria'
|
9
10
|
require 'mementus/node_proxy'
|
10
11
|
require 'mementus/edge_proxy'
|
11
12
|
require 'mementus/pipeline/pipe'
|
data/lib/mementus/graph.rb
CHANGED
data/lib/mementus/node_proxy.rb
CHANGED
@@ -74,19 +74,25 @@ module Mementus
|
|
74
74
|
@nodes[id]
|
75
75
|
end
|
76
76
|
|
77
|
-
def nodes(match
|
78
|
-
return @nodes.values
|
77
|
+
def nodes(*match)
|
78
|
+
return @nodes.values if match.empty?
|
79
79
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
80
|
+
criteria = Mementus::Criteria.new(match)
|
81
|
+
|
82
|
+
@nodes.values.select do |node|
|
83
|
+
selected = false
|
84
|
+
|
85
|
+
if criteria.label
|
86
|
+
selected = node.label == criteria.label
|
85
87
|
end
|
86
|
-
|
87
|
-
|
88
|
-
|
88
|
+
|
89
|
+
if criteria.props
|
90
|
+
key = criteria.props.first.first
|
91
|
+
val = criteria.props.first.last
|
92
|
+
selected = node[key] == val
|
89
93
|
end
|
94
|
+
|
95
|
+
selected
|
90
96
|
end
|
91
97
|
end
|
92
98
|
|
data/lib/mementus/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mementus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- maetl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
137
|
version: '0'
|
138
138
|
requirements: []
|
139
139
|
rubyforge_project:
|
140
|
-
rubygems_version: 2.6
|
140
|
+
rubygems_version: 2.7.6
|
141
141
|
signing_key:
|
142
142
|
specification_version: 4
|
143
143
|
summary: Graph data structure toolkit for Ruby applications.
|