dynamic-active-model 0.2.9 → 0.3.0

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: 6f562496911128d8af78b024d1e82092e69e9c0ae6471acae3d11b4bb1d53f4d
4
- data.tar.gz: 2e268dfbeba13bca6f48da567c500a3a85dcf543e11d763bacb1cdb70ad7297f
3
+ metadata.gz: fb9ff04233ee21e4f334a044c977634fe0a375218b87fda3c8aaadfe97b8137c
4
+ data.tar.gz: 9329b32d0761698b7b6b209a17c947da1a10c5bb3611d78a45118011425cb7b7
5
5
  SHA512:
6
- metadata.gz: 8fa288d881dae59b6ecccae8d70acdb862955a176644b4cf25f03aaf1b6821428220a55a32e5fe6f8b6cb82c09a89cf7be4ee84794deb7cc8c424bb9a6d6722b
7
- data.tar.gz: f7786e4be9cffb53c0e689c6ab0ca72d0d973d5706e4dbbc557f3efa8142592009ee0f6125ad7c6cc1c885f68736f41e6ab08c478df23e5bfd97674a533ea1d4
6
+ metadata.gz: 8a27485cf73b32056a961bdaf037818f7789fe88ccd9b0fd267d6c333842716c0bbe007dd23c99e214abcf1619354caf5708af146ea32f6fa3df1512536f4318
7
+ data.tar.gz: '09d22fcaf58beebc39ed805c8974c57173fcb41a625604a6b897b7f99aa680ccbd0dbd0ac2d913022753ffbbf986a569750f0d173a21630998d6a7ba1c271a15'
@@ -26,14 +26,22 @@ module DynamicActiveModel
26
26
  end
27
27
  end
28
28
 
29
+ def skip_tables(tables)
30
+ tables.each { |table| skip_table(table) }
31
+ end
32
+
29
33
  def include_table(table)
30
34
  if table.is_a?(Regexp)
31
35
  @include_table_matchers << table
32
36
  else
33
- @include_tables << table
37
+ @include_tables << table.to_s
34
38
  end
35
39
  end
36
40
 
41
+ def include_tables(tables)
42
+ tables.each { |table| include_table(table) }
43
+ end
44
+
37
45
  def table_class_name(table_name, class_name)
38
46
  @table_class_names[table_name.to_s] = class_name
39
47
  end
@@ -47,18 +55,18 @@ module DynamicActiveModel
47
55
  end
48
56
  end
49
57
 
50
- def skip_tables
58
+ def skipped_tables
51
59
  @skip_tables + @skip_table_matchers
52
60
  end
53
61
 
54
- def include_tables
62
+ def included_tables
55
63
  @include_tables + @include_table_matchers
56
64
  end
57
65
 
58
66
  private
59
67
 
60
68
  def skip_table?(table_name)
61
- @skip_tables.include?(table_name) ||
69
+ @skip_tables.include?(table_name.to_s) ||
62
70
  @skip_table_matchers.any? { |r| r.match(table_name) }
63
71
  end
64
72
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynamic-active-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Doug Youch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-22 00:00:00.000000000 Z
11
+ date: 2019-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord