set_visibility_for(methods, vis, singleton=false)
public
Given an array methods of method names, set the visibility of the
corresponding AnyMethod object
Show source
def set_visibility_for(methods, vis, singleton=false)
count = 0
@method_list.each do |m|
if methods.include?(m.name) && m.singleton == singleton
m.visibility = vis
count += 1
end
end
return if count == methods.size || singleton
@attributes.each do |a|
if methods.include?(a.name)
a.visibility = vis
count += 1
end
end
end