grumlin 1.0.0.rc5 → 1.0.0.rc6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/grumlin/typing.rb +3 -1
- data/lib/grumlin/version.rb +1 -1
- data/lib/grumlin/vertex.rb +3 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 532e0f94c094b94c4ad386ad8517ad38b829209f353f03a04e6233a8762deec4
|
4
|
+
data.tar.gz: 57600edef6a55885fc7888180d53acc5c8e34469261477413c24a4c121419eac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d4818f7132322930f3e779fb9ef65086c88d7b7989775072224debeae6b79e29e6f1b0598205d061b7261483625eb449c38c591a6ae719cad255dbb8303d9cd
|
7
|
+
data.tar.gz: 5fb44a15a91f158ace6596b889c7cf4189a76ef47a90734518b0adeee6a8e4d5846554178ded86875907cabd89020117de5961fffb1e4e742c2ff0a8955c4311
|
data/Gemfile.lock
CHANGED
data/lib/grumlin/typing.rb
CHANGED
@@ -20,12 +20,14 @@ module Grumlin::Typing
|
|
20
20
|
"g:T" => ->(value) { Grumlin::Expressions::T.public_send(value) }
|
21
21
|
}.freeze
|
22
22
|
|
23
|
-
CASTABLE_TYPES = [Hash, String, Integer, TrueClass, FalseClass, NilClass].freeze
|
23
|
+
CASTABLE_TYPES = [Hash, String, Integer, TrueClass, FalseClass, NilClass, Array].freeze
|
24
24
|
|
25
25
|
class << self
|
26
26
|
def cast(value)
|
27
27
|
verify_type!(value)
|
28
28
|
|
29
|
+
return value.map { |v| cast(v) } if value.is_a?(Array)
|
30
|
+
|
29
31
|
return value unless value.is_a?(Hash)
|
30
32
|
|
31
33
|
type = TYPES[value[:@type]]
|
data/lib/grumlin/version.rb
CHANGED
data/lib/grumlin/vertex.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
class Grumlin::Vertex
|
4
|
-
attr_reader :label, :id
|
4
|
+
attr_reader :label, :id, :properties
|
5
5
|
|
6
|
-
def initialize(label:, id:)
|
6
|
+
def initialize(label:, id:, properties: nil)
|
7
7
|
@label = label
|
8
8
|
@id = Grumlin::Typing.cast(id)
|
9
|
+
@properties = properties&.transform_values { |v| Grumlin::Typing.cast(v) }
|
9
10
|
end
|
10
11
|
|
11
12
|
def ==(other)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grumlin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.rc6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gleb Sinyavskiy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-pool
|