initializer 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f0a7fc98e59985399a53f85bd023324c8207f0d5
4
+ data.tar.gz: eb6cc262a6208f8286d8998671db9284d495e5bf
5
+ SHA512:
6
+ metadata.gz: 4d550ec1354c9e0e0f576c5589ed659069e4264ab86207c93d77bb5a8e43fdde3734f562729169c8c9a3b6109276a6d87466e8d439b9328e95dcf6196a72fa11
7
+ data.tar.gz: c95aedf7a98d6ff0b538391f5815848b49d44c6bd7e1a04fc5930908c4fad7d85bcb5692e0e45ad7c5512795eb6cbfeb36fe977654aa51b33fa7aa63ecbc2c89
@@ -1,5 +1,3 @@
1
- require 'extension'
2
-
3
1
  require 'initializer/parameter'
4
2
  require 'initializer/macro'
5
3
  require 'initializer/initializer'
@@ -12,7 +12,7 @@ module Initializer
12
12
 
13
13
  def self.build(target_class, parameters)
14
14
  parameters, options = separate_parameters(parameters)
15
- Extension.! options, InitializerOptions
15
+ options.extend InitializerOptions
16
16
  parameters = NormalizeParameters.normalize(parameters, options.visibility)
17
17
  instance = new target_class, parameters
18
18
  instance
@@ -56,14 +56,14 @@ module Initializer
56
56
 
57
57
  def self.define_initializer(target_class, parameters)
58
58
  parameters = parameters.map do |parameter|
59
- Extension.! parameter, InitializerParameter
59
+ parameter.extend InitializerParameter
60
60
  end
61
61
  instance = new target_class, parameters
62
62
  instance.define_initializer
63
63
  end
64
64
 
65
65
  def define_initializer
66
- body = build_initializer_definition
66
+ body = build_initializer_definition
67
67
  target_class.class_eval body
68
68
  end
69
69
 
@@ -100,7 +100,7 @@ CTOR
100
100
  end
101
101
  end
102
102
  end
103
-
103
+
104
104
  module InitializerOptions
105
105
  def visibility
106
106
  self[:default]
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: initializer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
5
- prerelease:
4
+ version: 0.0.5
6
5
  platform: ruby
7
6
  authors:
8
7
  - The Sans Collective
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2015-02-07 00:00:00.000000000 Z
11
+ date: 2015-04-28 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description:
15
14
  email:
@@ -17,33 +16,32 @@ executables: []
17
16
  extensions: []
18
17
  extra_rdoc_files: []
19
18
  files:
19
+ - lib/initializer.rb
20
20
  - lib/initializer/initializer.rb
21
21
  - lib/initializer/macro.rb
22
22
  - lib/initializer/parameter.rb
23
- - lib/initializer.rb
24
23
  homepage: https://github.com/Sans/initializer
25
24
  licenses:
26
25
  - MIT
26
+ metadata: {}
27
27
  post_install_message:
28
28
  rdoc_options: []
29
29
  require_paths:
30
30
  - lib
31
31
  required_ruby_version: !ruby/object:Gem::Requirement
32
- none: false
33
32
  requirements:
34
- - - ! '>='
33
+ - - ">="
35
34
  - !ruby/object:Gem::Version
36
35
  version: 1.9.2
37
36
  required_rubygems_version: !ruby/object:Gem::Requirement
38
- none: false
39
37
  requirements:
40
- - - ! '>='
38
+ - - ">="
41
39
  - !ruby/object:Gem::Version
42
40
  version: '0'
43
41
  requirements: []
44
42
  rubyforge_project:
45
- rubygems_version: 1.8.23
43
+ rubygems_version: 2.2.0
46
44
  signing_key:
47
- specification_version: 3
45
+ specification_version: 4
48
46
  summary: Initializer Library
49
47
  test_files: []