lib/aixm/concerns/association.rb
Method has_many
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def has_many(attribute, as: nil, accept: nil, &association_block)
association = attribute.to_s.inflect(:singularize)
inversion = as || self.to_s.inflect(:demodulize, :tableize, :singularize)
class_names = [accept || association].flatten.map { AIXM::CLASSES[_1.to_sym] || _1 }
(@has_many_attributes ||= []) << attribute