activeoopish 0.0.4 → 0.0.5

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
  SHA1:
3
- metadata.gz: b7ea031470768663369ee9f4274d678222ac5cb9
4
- data.tar.gz: f39b72f1dfa6af281f0004d5c48880138e449056
3
+ metadata.gz: d36e3d551e946a96d3708403f9ebdd839f59fda2
4
+ data.tar.gz: 813eba314006c6bf214ae6580158374a73cf45e6
5
5
  SHA512:
6
- metadata.gz: 94bf53a48e6a42e778512ff8ce45bac4c1678f3bd11274860163d14c19e41ec59819b2f1a013f898d37e57f471dc95f162c5826f7b2ddaaf41ed7dad55dae728
7
- data.tar.gz: 414ac20e021fea8ef5390ab9341807e8d495d62aacc0534ee95d419a6a5487eeace25bf51ef6436e190b02a39a7c0888d7ca127f382708ad98fa9c4ca97123bd
6
+ metadata.gz: 6fe3dba18ed69fb1e954d9c779afdfa488fc043da387cff374e07e4d95886c4dea82a05cf3ec0b353bbb014e830d792901aaa7a295d6528149cf77f277f4d518
7
+ data.tar.gz: 545827dc6bdcebe9807496430671b084f73bc2b94699db3266e240c8e467c1dc65c2ca2d48440c31ad466449e0719c629dc1e102be6eeffe7f0de2aa22699d71
@@ -4,6 +4,10 @@ module ActiveOopish
4
4
  module Inheritance
5
5
  extend ActiveSupport::Concern
6
6
 
7
+ included do
8
+ instance_variable_set('@instantiation_rules', [])
9
+ end
10
+
7
11
  module ClassMethods
8
12
  # Public:
9
13
  #
@@ -11,6 +15,7 @@ module ActiveOopish
11
15
  # condition - A Hash.
12
16
  #
13
17
  def instantiate_as(class_name, options = {})
18
+ @instantiation_rules ||= []
14
19
  @instantiation_rules << { class_name: class_name, condition: options.stringify_keys }
15
20
  end
16
21
 
@@ -1,3 +1,3 @@
1
1
  module ActiveOopish
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeoopish
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuku Takahashi