pre_and_post_initialize 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,6 +22,8 @@ module ::PreAndPostInitialize::ObjectInstance
|
|
22
22
|
# No arguments are expected here, but any will be passed to super.
|
23
23
|
#
|
24
24
|
def pre_initialize( *args, & block )
|
25
|
+
# call to super in case we extend Class or Module, so we can stack calls to pre_initialize
|
26
|
+
super if defined?( super )
|
25
27
|
# nothing here - subclasses define
|
26
28
|
end
|
27
29
|
|
@@ -40,6 +42,8 @@ module ::PreAndPostInitialize::ObjectInstance
|
|
40
42
|
# No arguments are expected here, but any will be passed to super.
|
41
43
|
#
|
42
44
|
def post_initialize( *args, & block )
|
45
|
+
# call to super in case we extend Class or Module, so we can stack calls to post_initialize
|
46
|
+
super if defined?( super )
|
43
47
|
# nothing here - subclasses define
|
44
48
|
end
|
45
49
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pre_and_post_initialize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-09 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Adds Object#pre_initialize so that events can occur before and after
|
15
15
|
Object#initialize chain.
|