descendants_describable 0.0.1 → 0.0.2

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: f07b9c0ee1c1dd2b19f7ba28d598614658619105
4
- data.tar.gz: 5db6cfc537b9a1f96f65a0f40519dbed9431bb72
3
+ metadata.gz: 2c650c74f19a68bd2dcce7e7275f89bd71c95b86
4
+ data.tar.gz: c589dd0540996c8428088e099c42dc89166d137f
5
5
  SHA512:
6
- metadata.gz: a22fb6c10a4c05f93b99161d402b495c9a7ea0fbbaa910cde264eb203ced55c0f56a37c22958a30dd708e1b63ad6f0c6ced081c4b198e4ba616d11457fb3ff01
7
- data.tar.gz: 141e27d4afa56f17353c1d16f2984e1c5222184ab843602c57894042bbe0e4fd39f9e18a4817a4232f0fb9bebe4f6f628887ec2a7c2438b3e8a958b8365b4bd1
6
+ metadata.gz: fc3bf3c5b27f2e8f096427b1cde262adbe25f0590a632a50e80111ac9050b9ce0b9147928e14e9f6128bd9f30ef51959e8c93bf430950e5b24681c0307ede0af
7
+ data.tar.gz: e218823dd0d83b50d3863505c77fe2d63d8129585726cb5a010d2a02018f03949a2b2bae95ae6197c43e921839c925fb07d1d3ed64253e8ae0aa671bfa88dfbb
@@ -1,3 +1,3 @@
1
1
  module DescendantsDescribable
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -41,7 +41,7 @@ module DescendantsDescribable
41
41
  else
42
42
  @common_modules << @description_module.const_get(method.to_s.camelize)
43
43
  yield if block_given?
44
- @common_modules.shift
44
+ @common_modules.pop
45
45
  end
46
46
  end
47
47
 
@@ -25,6 +25,14 @@ class Model < ActiveRecord::Base
25
25
  type :hadger do
26
26
  is_a_witch
27
27
  end
28
+
29
+ floats_like_a_duck do
30
+ type :tadger
31
+ end
32
+
33
+ is_a_witch do
34
+ type :madger
35
+ end
28
36
  end
29
37
 
30
38
  talks_like_a_duck do
@@ -43,7 +51,7 @@ describe DescendantsDescribable do
43
51
 
44
52
  describe '.type - for subclass generation' do
45
53
  it 'creates new subclass of each type' do
46
- [Badger, Hadger, Fadger, Ladger].each do |klass|
54
+ [Badger, Hadger, Fadger, Ladger, Tadger].each do |klass|
47
55
  expect(klass < Model).to be_true
48
56
  end
49
57
  end
@@ -60,6 +68,12 @@ describe DescendantsDescribable do
60
68
  expect(Ladger < Models::Descriptors::FloatsLikeADuck).to be_true
61
69
  expect(Ladger < Models::Descriptors::TalksLikeADuck).to be_true
62
70
  expect(Ladger < Models::Descriptors::IsAWitch).to be_true
71
+
72
+ expect(Tadger < Models::Descriptors::FloatsLikeADuck).to be_true
73
+ expect(Tadger < Models::Descriptors::WalksLikeADuck).to be_true
74
+
75
+ expect(Madger < Models::Descriptors::WalksLikeADuck).to be_true
76
+ expect(Madger < Models::Descriptors::IsAWitch).to be_true
63
77
  end
64
78
  end
65
79
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: descendants_describable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - winfred