Sha256: 4169e9b2e4d9581da4feb6f5c0b317c00e5f577f87a3f590c83ce2f9628cebfb
Contents?: true
Size: 572 Bytes
Versions: 1
Compression:
Stored size: 572 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.1 | lib/oh_my_log/request.rb |