typero 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/.version +1 -1
  3. data/lib/typero.rb +1 -0
  4. data/lib/typero/func.rb +14 -0
  5. metadata +2 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ba656a56b8d2e5d3d977a2973f6de881eefd3257397a4a4ebe908a7abaed70a7
4
- data.tar.gz: 8374f340b6af235c274ceaa9aace33f0c462b5a203d667a199fa519c1f56f53e
3
+ metadata.gz: e1b145b43e7736b2c9f673b6685388a39ee83fcba0bbcbc0ad2fcf8af2c1f692
4
+ data.tar.gz: dd730a85ab31d2b181b875d7052e3b109a263caba0618d869e262e3004e6d52f
5
5
  SHA512:
6
- metadata.gz: ba14e29595a5d17c3c3d102f49d1234a82e7ea23a7062a4a61c6dc56770d9d4922f1be7ae01663c41382efb6c6c51ed3fb5dfd4c188315ec1a5bf3f43eb699fc
7
- data.tar.gz: c2d8b322fac4048067b809bf7944c8ca27bb787d4b590a68eec62169a768a65ddbb089359da73f550a32b59a0405b95629ae4932bf7a3dfb9d5426e2e26d3e7d
6
+ metadata.gz: 86b7d2a84fccf9d800ae9c121773d3ae960b6f2c32100466836d6f07056ad2f2affa4fdbe8df8c91ea5cc208d7e006db993ddbce86c30b9652077b87f22cd4c5
7
+ data.tar.gz: 95a83f6b58874de8b27edb08811ea9543ebe7036550364d535f1a73042af90d77e36a891ccfcab9db36817572e6a400c203356cc54fb929358730bfc8425999e
data/.version CHANGED
@@ -1 +1 @@
1
- 0.8.0
1
+ 0.8.1
@@ -1,5 +1,6 @@
1
1
  # base libs
2
2
  require_relative 'typero/typero'
3
+ require_relative 'typero/func'
3
4
  require_relative 'typero/params'
4
5
  require_relative 'typero/type/type'
5
6
 
@@ -0,0 +1,14 @@
1
+ class Typero
2
+ SCHEMAS = {}
3
+ end
4
+
5
+ def Typero name=nil, &block
6
+ if block_given?
7
+ Typero.new(&block).tap do |schema|
8
+ Typero::SCHEMAS[name] = schema if name
9
+ end
10
+ else
11
+ raise ArgumentErorr.new('Schema nema not given') unless name
12
+ Typero::SCHEMAS[name] || raise(ArgumentErorr.new('Typero schema "%s" not defined' % name))
13
+ end
14
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typero
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dino Reic
@@ -34,6 +34,7 @@ files:
34
34
  - "./.version"
35
35
  - "./lib/adapters/sequel.rb"
36
36
  - "./lib/typero.rb"
37
+ - "./lib/typero/func.rb"
37
38
  - "./lib/typero/params.rb"
38
39
  - "./lib/typero/type/type.rb"
39
40
  - "./lib/typero/type/types/boolean.rb"