Sha256: d761933540ecd498a32be93ae7d262d918b4aa4aa885426ad68068e800f7b63c
Contents?: true
Size: 1 KB
Versions: 1
Compression:
Stored size: 1 KB
Contents
module WashoutBuilder module Document # module that is used for both complex types and exception class to find their ancestors and filter out some of the ancestors module SharedComplexType # Method that is used to fetch the ancestors of a class and fiter the ancestors that are present in the second argument # # @param [Class] class_name The class that is used to fetch the ancestors for # @param [Array<Class>] array The array of classes that should be fitered from the ancestors if they are present # @return [Array<Class>] The classes from which the class given as first argument inherits from but filtering the classes passed as second argument def get_complex_type_ancestors(class_name, array) (class_name.ancestors - class_name.included_modules).delete_if do |x| x.to_s.downcase == class_name.to_s.downcase || array.include?(x.to_s) || (x.respond_to?(:abstract_class) && x.abstract_class) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
washout_builder-2.0.5 | lib/washout_builder/document/shared_complex_type.rb |