Sha256: 738846c6635da71d42a764bbac668e805b28dfcf9d0c1c35d8ed0667835fb1b8
Contents?: true
Size: 576 Bytes
Versions: 1
Compression:
Stored size: 576 Bytes
Contents
module OhMyLog module Log #the request is what the user is trying to do class Request attr_reader :sender, :date, :params, :method, :status def initialize(args) @sender = args[:sender] @date = args[:date] @params = args[:params] @method = args[:method] @status = args[:status] end def to_s user_info = @sender.try(:email) sender = !user_info.blank? ? user_info : Thread.current["remote_ip"] "#{@date}, #{sender}, #{@method}, #{@params}, #{@status}" end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
oh_my_log-1.0.2 | lib/oh_my_log/request.rb |