lib/origen/parameters/set.rb in origen-0.54.4 vs lib/origen/parameters/set.rb in origen-0.54.5
- old
+ new
@@ -7,10 +7,14 @@
# Allow these parameter names to be valid. When used, they will override the
# methods of the same name provided by the Hash class.
OVERRIDE_HASH_METHODS = [:min, :max]
+ # Allow these parameter names to be valid. When used, they will override the
+ # methods of the same name provided by another class.
+ OVERRIDE_METHODS = [:chain]
+
def initialize(options = {})
if options[:top_level]
@top_level = self
@path = ''
@owner = options[:owner]
@@ -76,9 +80,17 @@
val
end
end
end
end
+ end
+ end
+ end
+
+ OVERRIDE_METHODS.each do |method|
+ define_method method do
+ if self[method]
+ method_missing(method)
end
end
end
OVERRIDE_HASH_METHODS.each do |method|