app/models/bplmodels/mods_desc_metadata.rb
def insert_host(nonSort=nil, main_title=nil, identifier=nil, args={})

      related_index = self.mods(0).related_item.count

      self.mods(0).related_item(related_index).type = 'host' unless main_title.blank? && identifier.blank?
      self.mods(0).related_item(related_index).title_info(0).nonSort = nonSort unless nonSort.blank?
      self.mods(0).related_item(related_index).title_info(0).title = main_title unless main_title.blank?
      self.mods(0).related_item(related_index).identifier = identifier unless identifier.blank?

      args.each do |key, value|
        self.mods(0).related_item(related_index).send(key, Bplmodels::DatastreamInputFuncs.utf8Encode(value)) unless value.blank?
      end
    end
#include Hydra::Datastream::CommonModsIndexMethods
# MODS XML constants.
include Hydra::Datastream::CommonModsIndexMethods
MODS XML constants.
include Hydra :: Datastream :: CommonModsIndexMethods MODS XML constants .
def insert_host(nonSort=nil, main_title=nil, identifier=nil, args={})
      related_index = self.mods(0).related_item.count
      self.mods(0).related_item(related_index).type = 'host' unless main_title.blank? && identifier.blank?
      self.mods(0).related_item(related_index).title_info(0).nonSort = nonSort unless nonSort.blank?
      self.mods(0).related_item(related_index).title_info(0).title = main_title unless main_title.blank?
      self.mods(0).related_item(related_index).identifier = identifier unless identifier.blank?
      args.each do |key, value|
        self.mods(0).related_item(related_index).send(key, Bplmodels::DatastreamInputFuncs.utf8Encode(value)) unless value.blank?
      end
    end
def insert_host ( nonSort = nil , main_title = nil , identifier = nil , args = { } ) related_index = self . mods ( 0 ) . related_item . count self . mods ( 0 ) . related_item ( related_index ) . type = 'host' unless main_title . blank? && identifier . blank? self . mods ( 0 ) . related_item ( related_index ) . title_info ( 0 ) . nonSort = nonSort unless nonSort . blank? self . mods ( 0 ) . related_item ( related_index ) . title_info ( 0 ) . title = main_title unless main_title . blank? self . mods ( 0 ) . related_item ( related_index ) . identifier = identifier unless identifier . blank? args . each do | key , value | self . mods ( 0 ) . related_item ( related_index ) . send ( key , Bplmodels :: DatastreamInputFuncs . utf8Encode ( value ) ) unless value . blank? end end
include Hydra::Datastream::CommonModsIndexMethods
MODS XML constants.
include Hydra :: Datastream :: CommonModsIndexMethods MODS XML constants .
nonSort
main_title
identifier
args