dtr_core 0.7.1 → 0.7.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dtr_core/instruction.rb +10 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c9f5d565053f972e929ebf804b406c0d7ffac636696735090e24ff2b6894025
4
- data.tar.gz: 689ce2465bc629ff58dfb90ceac46603f55d0c67f21b98147af65d22861d4bd9
3
+ metadata.gz: 19a8e9e136ddf241763741eab8b5c9c1e561dc585b01fc880e3569755b6ab7a9
4
+ data.tar.gz: 158427c0b5e4bc3cc9a50682d225cc0071984d2e7d86cc00c375b67ec5335fe9
5
5
  SHA512:
6
- metadata.gz: 1a7e1c1981489448008d43bf66a91544154b6ed1b406d23f13e8b5b509e1f15bc6ecb3b24ab94b80ecdedef8af36329888353265c0f03a68cab5a4abfc549722
7
- data.tar.gz: cb15e80e14bc5c894a8ab33dae2c4a72924354fe033e67d2ad26c4bd6af1b1b2ad7691a23cd5dfb4002401ff7114bbeb2a793df9c2c4e0bcd566cfdc75105c02
6
+ metadata.gz: df4f33aac6008dc6c7b1ef616d1c35281f137127ef0d00ebc14bb643655755745b5aba94e1e7418c7914ddceb7134ebe3f314449321d6de02ccb76c20f339644
7
+ data.tar.gz: 8eaaf4063a3f1887a0d0a5c755a75875fa23f0d434af392f30ffdf9df2cde8e30984b5710b812c88ace2af240a21eaae42f266abd4b97f6f361b1d447ff69d1e
@@ -20,11 +20,20 @@ module DTRCore
20
20
  end
21
21
 
22
22
  def to_s
23
- "{ instruction: #{instruction}," \
23
+ "{ instruction: #{instruction}, " \
24
24
  "input: (#{inputs&.join(', ')}), " \
25
25
  "assign: #{assign}, scope: #{scope} }"
26
26
  end
27
27
 
28
+ def to_json(*_args)
29
+ {
30
+ instruction:,
31
+ inputs:,
32
+ assign:,
33
+ scope:
34
+ }.to_json
35
+ end
36
+
28
37
  def valid?
29
38
  DTRCore::InstructionValidator.new(self).valid?
30
39
  end
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.1
4
+ version: 0.7.2
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-21 00:00:00.000000000 Z
11
+ date: 2024-06-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Core smart contract intermediate language (Digicus Textual Representation)
14
14
  parser.