def self.has_many *options
configuration = {}
configuration.update(options.pop) if options.last.is_a?(Hash)
class_with_container = nil
if configuration[:in]
class_with_container = options[0].to_s.capitalize[0..-2] + ":#{configuration[:in].to_s}"
else
class_with_container = options[0].to_s.capitalize[0..-2] + ":#{options[0].to_s}"
end
unless @@classes_with_brothers.include?(class_with_container)
@@classes_with_brothers << class_with_container
end
@has_many = [] if @has_many.nil?
unless @has_many.include?(options[0])
@has_many << options[0]
load "#{ADAPTOR_ROOT}/app/messages/_#{options[0].to_s[0..-2]}.rb"
klass = get_class_object(options[0].to_s.capitalize[0..-2])
if configuration[:in]
xml_object configuration[:in], klass, ROXML::TAG_ARRAY, configuration[:in].to_s
validates_associated configuration[:in]
else
xml_object options[0], klass, ROXML::TAG_ARRAY
validates_associated options[0]
end
end
end