module_with_params 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,13 +7,15 @@ module ModuleWithParams
7
7
 
8
8
  module ClassMethods
9
9
  def [](*args)
10
- clone.tap do |mod|
11
- module_name = self.name
12
- mod.instance_eval do
13
- define_method(:"_#{module_name}_module_options"){ (args.size == 1) ? args[0] : args }
14
- end
10
+ m = self
11
+
12
+ Module.new do
13
+ include m
14
+ define_method(:"_#{m.name}_module_options"){ (args.size == 1) ? args[0] : args }
15
15
  end
16
+
16
17
  end
17
18
  end
18
19
 
19
20
  end
21
+
@@ -1,3 +1,3 @@
1
1
  module ModuleWithParams
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: module_with_params
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
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: 2011-11-14 00:00:00.000000000 Z
12
+ date: 2012-01-24 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: include module with parameters
15
15
  email: []
@@ -40,7 +40,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
40
40
  version: '0'
41
41
  segments:
42
42
  - 0
43
- hash: -1270772489623524378
43
+ hash: 2944426835664010523
44
44
  required_rubygems_version: !ruby/object:Gem::Requirement
45
45
  none: false
46
46
  requirements:
@@ -49,10 +49,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
49
49
  version: '0'
50
50
  segments:
51
51
  - 0
52
- hash: -1270772489623524378
52
+ hash: 2944426835664010523
53
53
  requirements: []
54
54
  rubyforge_project:
55
- rubygems_version: 1.8.11
55
+ rubygems_version: 1.8.15
56
56
  signing_key:
57
57
  specification_version: 3
58
58
  summary: module with parameters