Module: WashoutBuilder::Document::SharedComplexType

Included in:
ComplexType, ExceptionModel
Defined in:
lib/washout_builder/document/shared_complex_type.rb

Overview

module that is used for both complex types and exception class to find their ancestors and filter out some of the ancestors

Instance Method Summary collapse

Instance Method Details

#get_complex_type_ancestors(class_name, array) ⇒ Array<Class>

Method that is used to fetch the ancestors of a class and fiter the ancestors that are present in the second argument


10
11
12
# File 'lib/washout_builder/document/shared_complex_type.rb', line 10

def get_complex_type_ancestors(class_name, array)
  (class_name.ancestors - class_name.included_modules).delete_if { |x| x.to_s.downcase == class_name.to_s.downcase || array.include?(x.to_s) }
end