bank 0.1.12 → 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bank/bank.rb +23 -0
  3. metadata +2 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a3e767bd9ffd7e4079353309183b52e5d59f398b
4
- data.tar.gz: 69c9eef283bebf2dace3e0ffa8c9ee0b1c95c70c
3
+ metadata.gz: ec24a9502df3858bb73fea4ba313e2c0b1980aef
4
+ data.tar.gz: d6b8a5e047083555737cc5ea3db066da8518f2ea
5
5
  SHA512:
6
- metadata.gz: b4645de4458dec543b0eaf11ac5515b3d3457f5089576eef25835629d0eb1a607b6198512141a477892a9ad1e9bd3026cfb13d7f55ce9ddca463d44ee5f5ebd1
7
- data.tar.gz: f562804113fde4705704322a2aa867b593006a3d08c835de8ada2fe122d0cb9dfd8039c5e267c21e276c0a2d96f5014287c16b8cf2224ad3328179f6fa0902e2
6
+ metadata.gz: b4afeca1581199e7965cb85cd94351bfaf97884b2c0d3a7a20ecf4500f63aca091413d881fcbedd4eb0c16e3ca0a3db0c49f516a39425bf9eed017524b5cd580
7
+ data.tar.gz: a993cdbe86249fdbe38a65bc1ca2740aa22b365e68ab631d4f4d19e1d20dce4b0a683a7bd61cbe3591d1da27adfd7727c9d1def5b79780bd5cd198f12ca9c708
data/lib/bank/bank.rb ADDED
@@ -0,0 +1,23 @@
1
+ require 'attr_protected'
2
+ require 'bank/model'
3
+ require 'bank/collection'
4
+ require 'bank/result'
5
+ require 'bank/config'
6
+
7
+ module Bank
8
+ class << self
9
+ attr_protected :_config, :db
10
+
11
+ def use_db(db)
12
+ self.db = db
13
+ end
14
+
15
+ def [](name)
16
+ self.db[name]
17
+ end
18
+
19
+ def config
20
+ self._config ||= Bank::Config.new
21
+ end
22
+ end
23
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bank
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Pratt
@@ -96,6 +96,7 @@ executables: []
96
96
  extensions: []
97
97
  extra_rdoc_files: []
98
98
  files:
99
+ - lib/bank/bank.rb
99
100
  - lib/bank/collection.rb
100
101
  - lib/bank/collection_config.rb
101
102
  - lib/bank/config.rb