z4blockchain 0.1.1 → 0.1.2

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: b55d837ace4ec467fd48cf456c006f8499da8d68565bda22af52fdb7dfcadf81
4
- data.tar.gz: 277ac0a93fd53621b7905fbfa1e22439b97f9ae329c58a80cde87e3f8f9cfbfa
3
+ metadata.gz: 441cf17361208db50b47e83e503d3a925b4e2f787db8be38cd3257aeb287cd26
4
+ data.tar.gz: 37f5a8856a56719c639a77dbd2bc5e483c36d56071036edf7f46a2ecd3cb3ebc
5
5
  SHA512:
6
- metadata.gz: e091511be45693f9b613e2bd51c4ede33a97a35366fe51e8e9cd959100bbfaa621ae50dde90850ba39025d894a7471d63883e7699c5d3e5eaa82cbc10df7a32f
7
- data.tar.gz: cf98306f43b3f6aa4557835dec9eddd29ade91c29ae0fc2f444fa38a4edefedf0e48728e7e018816f28a56638a76c4e4785855da68fdd6e9fe05d4215bd2f9b7
6
+ metadata.gz: ac66a6c1d06177116fff2b01af67cef2864114a5272b91dab717383273e12758fdc84743ebb9621751aff5ac2f4aab1569b112dac7443b3d2fbde969cd20de70
7
+ data.tar.gz: 6dae7ff51aaf2a5d8cf6babf24eb927f0ea5369e5d7bf04d6c8dd42432456939b30f6348d5af067b66131f992e2e29f4079ca54e2b234c14c40ff515760ea790
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Z4blockchain
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  COMMIT = `git log --format="%H" -n 1`.strip
6
6
  end
data/lib/z4blockchain.rb CHANGED
@@ -76,6 +76,12 @@ module Z4BC
76
76
  return h
77
77
  end
78
78
 
79
+ def self.balance u
80
+ x = 0
81
+ BANK.each_pair { |k,v| x += v[u] }
82
+ return x
83
+ end
84
+
79
85
  def self.bank b
80
86
  BANK[b]
81
87
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: z4blockchain
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Olson