class LogGenerator::Apache::Host
Attributes
ip[R]
Public Class Methods
new()
click to toggle source
# File lib/apache-loggen/base.rb, line 151 def initialize @ip = "#{(grand(210)+20)/4*4}.#{(grand(210)+20)/3*3}.#{grand(210)+20}.#{grand(210)+20}" @agents = [] end
Public Instance Methods
agent()
click to toggle source
# File lib/apache-loggen/base.rb, line 158 def agent if @agents.size == 4 @agents[grand(4)] else agent = AGENT_LIST[grand(AGENT_LIST.size)] @agents << agent agent end end