class Visit

Attributes

log_entry[R]

Public Class Methods

new(log_entry) click to toggle source
# File lib/sp_log_parser/visit.rb, line 4
def initialize(log_entry)
  @log_entry = log_entry
end

Public Instance Methods

==(other) click to toggle source
# File lib/sp_log_parser/visit.rb, line 8
def ==(other)
  log_entry == other.log_entry
end
ip_address() click to toggle source
# File lib/sp_log_parser/visit.rb, line 16
def ip_address
  parsed_log[1]
end
webpage() click to toggle source
# File lib/sp_log_parser/visit.rb, line 12
def webpage
  parsed_log[0]
end

Private Instance Methods

parsed_log() click to toggle source
# File lib/sp_log_parser/visit.rb, line 22
def parsed_log
  log_entry.split("\s")
end