hash-hooked 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,6 +2,29 @@
2
2
  module ::Hash::Hooked::HashInterface
3
3
 
4
4
  instances_identify_as!( ::Hash::Hooked )
5
+
6
+ ################
7
+ # initialize #
8
+ ################
9
+
10
+ # Initialize with reference a configuration instance.
11
+ # @param [Object] object Object that HookedHash instance is attached to, primarily useful for
12
+ # reference from hooks.
13
+ # @param [Hash<Object>] args Parameters passed through super to Hash#initialize.
14
+ # @return [true,false] Whether receiver identifies as object.
15
+ def initialize( configuration_instance = nil, *args )
16
+
17
+ @configuration_instance = configuration_instance
18
+
19
+ super( *args )
20
+
21
+ end
22
+
23
+ ############################
24
+ # configuration_instance #
25
+ ############################
26
+
27
+ attr_accessor :configuration_instance
5
28
 
6
29
  ###################################### Subclass Hooks ##########################################
7
30
 
@@ -7,20 +7,8 @@ files = [
7
7
 
8
8
  ]
9
9
 
10
- second_basepath = '../hooked_hash'
11
-
12
- second_files = [
13
-
14
- 'hash_interface'
15
-
16
- ]
17
-
18
10
  files.each do |this_file|
19
11
  require_relative( File.join( basepath, this_file ) + '.rb' )
20
12
  end
21
- second_files.each do |this_file|
22
- require_relative( File.join( second_basepath, this_file ) + '.rb' )
23
- end
24
13
 
25
14
  require_relative( basepath + '.rb' )
26
- require_relative( second_basepath + '.rb' )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hash-hooked
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -40,9 +40,7 @@ files:
40
40
  - lib/hash/requires.rb
41
41
  - lib/hash-hooked.rb
42
42
  - lib/hooked/hash.rb
43
- - lib/hooked_hash/hash_interface.rb
44
- - lib/hooked_hash.rb
45
- - spec/hash/hooked_spec.rb
43
+ - spec/Hash/Hooked_spec.rb
46
44
  - README.md
47
45
  - CHANGELOG.rdoc
48
46
  homepage: http://rubygems.org/gems/hash-hooked
@@ -1,6 +0,0 @@
1
-
2
- class ::HookedHash < ::Hash::Hooked
3
-
4
- include ::HookedHash::Interface
5
-
6
- end
@@ -1,29 +0,0 @@
1
-
2
- module ::HookedHash::Interface
3
-
4
- instances_identify_as!( ::HookedHash )
5
-
6
- ################
7
- # initialize #
8
- ################
9
-
10
- # Initialize with reference a configuration instance.
11
- # @param [Object] object Object that HookedHash instance is attached to, primarily useful for
12
- # reference from hooks.
13
- # @param [Hash<Object>] args Parameters passed through super to Hash#initialize.
14
- # @return [true,false] Whether receiver identifies as object.
15
- def initialize( configuration_instance = nil, *args )
16
-
17
- @configuration_instance = configuration_instance
18
-
19
- super( *args )
20
-
21
- end
22
-
23
- ############################
24
- # configuration_instance #
25
- ############################
26
-
27
- attr_accessor :configuration_instance
28
-
29
- end