lib/parameters/class_methods.rb in parameters-0.2.1 vs lib/parameters/class_methods.rb in parameters-0.2.2
- old
+ new
@@ -101,11 +101,11 @@
#
def get_param(name)
name = name.to_sym
ancestors.each do |ancestor|
- if ancestor.include?(Parameters)
+ if ancestor.included_modules.include?(Parameters)
if ancestor.params.has_key?(name)
return ancestor.params[name]
end
end
end
@@ -120,11 +120,11 @@
#
def has_param?(name)
name = name.to_sym
ancestors.each do |ancestor|
- if ancestor.include?(Parameters)
+ if ancestor.included_modules.include?(Parameters)
return true if ancestor.params.has_key?(name)
end
end
return false
@@ -136,10 +136,10 @@
# @yield [param]
# The block that will be passed each class parameter.
#
def each_param(&block)
ancestors.each do |ancestor|
- if ancestor.include?(Parameters)
+ if ancestor.included_modules.include?(Parameters)
ancestor.params.each_value(&block)
end
end
return self