Skip to content

Commit

Permalink
* Gardening..
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Hollensbe committed May 6, 2010
1 parent 3b9df48 commit 03680ab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/methlab.rb
Expand Up @@ -127,7 +127,7 @@ def self.validate_array_params(signature, args)
return ArgumentError.new("argument #{key} does not exist in prototype")
end

if !signature[key].nil?
if signature[key]
ret = check_type(signature[key], value, key)
return ret unless ret.nil?
end
Expand All @@ -151,7 +151,7 @@ def self.validate_params(signature, *args)
return ArgumentError.new("argument '#{key}' does not exist in prototype")
end

if !signature[key].nil?
if signature[key]
ret = check_type(signature[key], value, key)
return ret unless ret.nil?
end
Expand Down Expand Up @@ -204,7 +204,7 @@ def build_ordered(*args, &block)
# or module. Currently cannot be a class method.
def def_ordered(method_name, *args, &block)
self.send(:define_method, method_name, &build_ordered(*args, &block))
method_name
return method_name
end

# Builds an unbound method as a proc with named (Hash) parameters.
Expand Down Expand Up @@ -238,7 +238,7 @@ def build_named(*args, &block)
# or module. Currently cannot be a class method.
def def_named(method_name, *args, &block)
self.send(:define_method, method_name, &build_named(*args, &block))
method_name
return method_name
end

# Similar to MethLab#build_ordered, but builds attributes similar to
Expand Down

0 comments on commit 03680ab

Please sign in to comment.