evt-schema 2.2.3.0 → 2.2.4.0

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/schema/schema.rb +7 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c8e31a467379493fdd3ec2e248377543c76fbc87f5f0daeb949f02db24938d9
4
- data.tar.gz: c11380e93d31f1c4b23429d6207ca5fcf096174260aadfa2e562396602eda029
3
+ metadata.gz: 42c0ba35a8f9d61ef11d61b103d4c7c37d747475dfb56d72674cbb497b663cfe
4
+ data.tar.gz: ee145e7df6483dd0afcf0ca6754eceda6078b182d6486a0a055b9191c628dca8
5
5
  SHA512:
6
- metadata.gz: 266184bb8a7cb67d710d2a58dd50100089b3e75439e27231bd8a1fb667aaa6fdfb305435e71dfd2808d2ae02e88d8386f41c95f893838eb252eda8b9932ea670
7
- data.tar.gz: f470e139e28f28ad52705d974e3dc1bc314f0091cbb5c2f0a4aa9b8e20bc73e31c4734ed90b2e60934300c566de92e97f8109191442e2d9011213d9124c57bec
6
+ metadata.gz: 11aec5d0798a7fcbf2be9673600fb3b704b8630ffa0caaff7e50915142f15de180f5a0a621fab59deab2e4265d656db669a4db329e42c0b5519eff6e767161c9
7
+ data.tar.gz: 4c2a27e05c3a2978fd788f75a1d1e7c2181286ad430e6c58176b73917160a606b5350d30faf31092adcccb2882e50c9799efe54fc61e9603ff5d095ec215bf5d
@@ -3,6 +3,7 @@ module Schema
3
3
 
4
4
  def self.included(cls)
5
5
  cls.class_exec do
6
+ extend Info
6
7
  extend AttributeMacro
7
8
  extend Attributes
8
9
 
@@ -13,6 +14,12 @@ module Schema
13
14
  end
14
15
  end
15
16
 
17
+ module Info
18
+ def type
19
+ name.split('::').last
20
+ end
21
+ end
22
+
16
23
  module AttributeMacro
17
24
  def attribute_macro(attribute_name, type=nil, strict: nil, default: nil)
18
25
  if type.nil? && !strict.nil?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.3.0
4
+ version: 2.2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Eventide Project
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-09 00:00:00.000000000 Z
11
+ date: 2020-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: evt-attribute