named-parameters 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/RELEASENOTES +4 -0
- data/VERSION +1 -1
- data/lib/named-parameters/module.rb +3 -3
- data/named-parameters.gemspec +1 -1
- metadata +3 -3
data/RELEASENOTES
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
@@ -123,9 +123,9 @@ module NamedParameters
|
|
123
123
|
# insert parameter validation prior to executing the instrumented method
|
124
124
|
def intercept method, owner, name, spec # :nodoc:
|
125
125
|
define_method name do |*args, &block|
|
126
|
-
params
|
127
|
-
|
128
|
-
NamedParameters::validate
|
126
|
+
params = args.find{ |arg| arg.instance_of? Hash }
|
127
|
+
fullname = "#{owner}#{name}"
|
128
|
+
NamedParameters::validate fullname, params || {}, spec
|
129
129
|
method.bind(self).call(*args, &block)
|
130
130
|
end
|
131
131
|
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: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Juris Galang
|