named-parameters 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/RELEASENOTES +10 -1
- data/VERSION +1 -1
- data/lib/named-parameters/module.rb +1 -1
- data/named-parameters.gemspec +1 -1
- metadata +3 -3
data/RELEASENOTES
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
0.0.2 [Nov 10, 2010]
|
2
|
+
--------------------
|
3
|
+
- [BUGFIX] ArgumentError incorrectly references Module instead of actual class
|
4
|
+
that raised it.
|
5
|
+
|
6
|
+
0.0.1 [Nov 10, 2010]
|
7
|
+
--------------------
|
8
|
+
- Initial release.
|
9
|
+
|
1
10
|
0.0.0 [Nov 10, 2010]
|
2
11
|
--------------------
|
3
|
-
- Initial
|
12
|
+
- Initial release. (yanked)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
@@ -22,7 +22,6 @@ module NamedParameters
|
|
22
22
|
|
23
23
|
private
|
24
24
|
def self.validate name, params, spec
|
25
|
-
name = "#{self.class.name}##{name}"
|
26
25
|
spec[:required] ||= []
|
27
26
|
spec[:optional] ||= []
|
28
27
|
|
@@ -62,6 +61,7 @@ module NamedParameters
|
|
62
61
|
spec = specs.delete(name)
|
63
62
|
define_method name do |*args, &block|
|
64
63
|
params = args.find{ |arg| arg.instance_of? Hash }
|
64
|
+
name = "#{self.class.name}##{name}"
|
65
65
|
NamedParameters::validate name, params || {}, spec
|
66
66
|
method.bind(self).call(*args, &block)
|
67
67
|
end
|
data/named-parameters.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: named-parameters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Juris Galang
|