dtr_core 0.7.2 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 19a8e9e136ddf241763741eab8b5c9c1e561dc585b01fc880e3569755b6ab7a9
4
- data.tar.gz: 158427c0b5e4bc3cc9a50682d225cc0071984d2e7d86cc00c375b67ec5335fe9
3
+ metadata.gz: cfbb64221cf4951c057d70eebcfb02cfb6c26930db47e47e8b56b2d02619631b
4
+ data.tar.gz: 99df8b3da4826433ceddb12930209c8bc0d55b91db84086a4485d13324a6c60f
5
5
  SHA512:
6
- metadata.gz: df4f33aac6008dc6c7b1ef616d1c35281f137127ef0d00ebc14bb643655755745b5aba94e1e7418c7914ddceb7134ebe3f314449321d6de02ccb76c20f339644
7
- data.tar.gz: 8eaaf4063a3f1887a0d0a5c755a75875fa23f0d434af392f30ffdf9df2cde8e30984b5710b812c88ace2af240a21eaae42f266abd4b97f6f361b1d447ff69d1e
6
+ metadata.gz: e158a6bdc13ea1ccd1923828b4c073c88412e7b515950c4a77bcf96d851bb0ea217c31fc68161b5a2d04cbbad49b19c76b1e7888294792eb01e1d84a1c0db7ed
7
+ data.tar.gz: 64e797566826df76b489829408a3865de303e50481558844c0d51b718ae80d93ac6fb162393249d81a317b60a4963ed78c7f2b3d80cd57c1825df0890b48806c
@@ -31,6 +31,8 @@ module DTRCore
31
31
  validate_object_operation!
32
32
  when 'add', 'subtract', 'multiply', 'divide'
33
33
  validate_binary_operation!
34
+ when 'increment'
35
+ true
34
36
  else
35
37
  false
36
38
  end
@@ -28,9 +28,15 @@ module DTRCore
28
28
  end
29
29
 
30
30
  def self.transform_attributes(capture_attribute_definition)
31
- capture_attribute_definition&.map { |x| x.split(':') }
32
- &.filter { |x| x.length > 1 }
33
- &.map { |x| { name: x[0].strip, type: x[1].strip } }
31
+ capture_attribute_definition&.map do |x|
32
+ splitted = x.split(':')
33
+ next { name: splitted[0].strip, type: splitted[1].strip } if splitted.length > 1
34
+
35
+ splitted = x.split('=')
36
+ next { name: splitted[0].strip, value: splitted[1].strip } if splitted.length > 1
37
+
38
+ nil
39
+ end&.compact
34
40
  end
35
41
 
36
42
  def self.capture_name(definition)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dtr_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Durst
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-22 00:00:00.000000000 Z
11
+ date: 2024-06-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Core smart contract intermediate language (Digicus Textual Representation)
14
14
  parser.