hostsgen.rb
# process a host item using rule
# return processed item
process a host item using rule
return processed item
process a host item using rule return processed item
def process(hostsitem)
    item = HostsItem.new nil, nil, nil
    if not @put_in_host.nil?
      if @put_in_host
        tmp = @host.dup
        tmp.insert @host_insert_idx, hostsitem.loc
        item.set tmp, @loc, hostsitem.line
      else
        tmp = @loc.dup
        tmp.insert @loc_insert_idx, hostsitem.loc
        item.set @host, tmp, hostsitem.line
      end
      return item
    else
      tmp_host = @host.dup
      tmp_host.insert @host_insert_idx, hostsitem.host
      tmp_loc = @loc.dup
      tmp_loc.insert @loc_insert_idx, hostsitem.loc
      item.set tmp_host, tmp_loc, hostsitem.line
      return item
    end
  end
def process ( hostsitem ) item = HostsItem . new nil , nil , nil if not @put_in_host . nil? if @put_in_host tmp = @host . dup tmp . insert @host_insert_idx , hostsitem . loc item . set tmp , @loc , hostsitem . line else tmp = @loc . dup tmp . insert @loc_insert_idx , hostsitem . loc item . set @host , tmp , hostsitem . line end return item else tmp_host = @host . dup tmp_host . insert @host_insert_idx , hostsitem . host tmp_loc = @loc . dup tmp_loc . insert @loc_insert_idx , hostsitem . loc item . set tmp_host , tmp_loc , hostsitem . line return item end end
process a host item using rule
return processed item
process a host item using rule return processed item
hostsitem