Class: Wlog::LogEntry
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Wlog::LogEntry
- Includes:
- TextFilters
- Defined in:
- lib/wlog/domain/log_entry.rb
Overview
Active Record Domain object for a log entry
Instance Method Summary collapse
-
#to_s ⇒ Object
Print things nicely formmated no more than 80 cars (well, unless you stick the time in the end which is not counted for).
Methods included from TextFilters
Instance Method Details
#to_s ⇒ Object
Print things nicely formmated no more than 80 cars (well, unless you stick the time in the end which is not counted for).
17 18 19 20 21 22 23 24 25 |
# File 'lib/wlog/domain/log_entry.rb', line 17 def to_s str = "[#{id}] " tmp = "#{description} [#{created_at.strftime("%H:%M:%S")}]" desc = Helpers.break_string(tmp,80) indent = " " * (id.to_s.split('').count + 5) desc.gsub!(/#{$/}/, "#{$/}#{indent}") str.concat(desc) highlight_hyperlink_s(str) end |