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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8a926f7ceafbe22e613403079a0b5dc220b606b999481bc7971cb02ba629363
4
- data.tar.gz: dd2f10b273622c6a19c989e67b6d99c33b0cebd928dacfa57cef681f489570a8
3
+ metadata.gz: 532e0f94c094b94c4ad386ad8517ad38b829209f353f03a04e6233a8762deec4
4
+ data.tar.gz: 57600edef6a55885fc7888180d53acc5c8e34469261477413c24a4c121419eac
5
5
  SHA512:
6
- metadata.gz: 6249760bd49fe1bdafed248b087d1361fce5781246c8ac87b3b3be4844fa80b8b44628c01cbcfe16c35c5b89d17d987eba338877ec8a4c14451d0f31b015c30c
7
- data.tar.gz: a67cd4edbf4b6a0e442534657a10412851024f571ea262a6a62b49debac3406177f3679a525f39d63fd7316335e8bec4d40715a040f834116dd7427181f8111e
6
+ metadata.gz: 7d4818f7132322930f3e779fb9ef65086c88d7b7989775072224debeae6b79e29e6f1b0598205d061b7261483625eb449c38c591a6ae719cad255dbb8303d9cd
7
+ data.tar.gz: 5fb44a15a91f158ace6596b889c7cf4189a76ef47a90734518b0adeee6a8e4d5846554178ded86875907cabd89020117de5961fffb1e4e742c2ff0a8955c4311
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- grumlin (1.0.0.rc5)
4
+ grumlin (1.0.0.rc6)
5
5
  async-pool (~> 0.3)
6
6
  async-websocket (>= 0.19, < 0.20)
7
7
  ibsciss-middleware (~> 0.4.0)
@@ -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]]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Grumlin
4
- VERSION = "1.0.0.rc5"
4
+ VERSION = "1.0.0.rc6"
5
5
  end
@@ -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.rc5
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-20 00:00:00.000000000 Z
11
+ date: 2022-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-pool