def association(name, options={})
      association = Metasploit::Model::Association::Reflection.new(
          :model => self,
          :name => name.to_sym,
          :class_name => options[:class_name]
      )
      association.valid!

      association_by_name[association.name] = association
    end
def association(name, options={})
      association = Metasploit::Model::Association::Reflection.new(
          :model => self,
          :name => name.to_sym,
          :class_name => options[:class_name]
      )
      association.valid!

      association_by_name[association.name] = association
    end
Registers an association.

 @param name [to_sym] Name of the association
 @param options [Hash{Symbol => String}]
 @option options [String] :class_name Name of association's class.
 @return [Metasploit::Model::Association::Reflection] the reflection of the registered association.
 @raise [Metasploit::Model::Invalid] if name is blank.
 @raise [Metasploit::Model::Invalid] if :class_name is blank.