Browse files

Add #to_s methods to Controller and Action and update LogEntry#to_s

  • Loading branch information...
1 parent 8f3d038 commit 9d540be310a0480917ee3e7f951f543449fb15db @jtrupiano jtrupiano committed Jul 10, 2009
Showing with 10 additions and 0 deletions.
  1. +3 −0 lib/slow_actions_action.rb
  2. +3 −0 lib/slow_actions_controller.rb
  3. +4 −0 lib/slow_actions_log_entry.rb
View
3 lib/slow_actions_action.rb
@@ -26,5 +26,8 @@ def add_entry(la)
# All the #LogEntry objects this #Action holds
attr_reader :log_entries
+ def to_s
+ @name
+ end
end
end
View
3 lib/slow_actions_controller.rb
@@ -29,5 +29,8 @@ def add_action(a)
# All the #Actions under this #Controller
attr_reader :actions
+ def to_s
+ @name
+ end
end
end
View
4 lib/slow_actions_log_entry.rb
@@ -38,5 +38,9 @@ def error?
return false if error_text.nil? or error_text.empty?
return true
end
+
+ def to_s
+ "#{date} #{time} #{method} #{controller}##{action} #{parameters}"
+ end
end
end

0 comments on commit 9d540be

Please sign in to comment.