Permalink
Browse files

Added to_past_tense

  • Loading branch information...
1 parent 5f598cd commit ed0d52ed1cca3298e0e1f68aceb54d580cc9c85d @parolkar committed Apr 1, 2009
Showing with 11 additions and 8 deletions.
  1. +8 −8 README
  2. +3 −0 lib/string_ext.rb
View
16 README
@@ -9,14 +9,14 @@ Example
=======
With this plugin installed in your rails app, you will be able to perform operations on strings this way...
- "create".past_tensed => "created"
- "buy".past_tensed => "baught"
- "fight".past_tensed => "faught"
- "market".past_tensed => "marketed"
- "animate".past_tensed => "animated"
- "fluctuate".past_tensed => "fluctuated"
- "tag".past_tensed => "tagged"
- "feel".past_tensed => "felt"
+ "create".to_past_tense => "created"
+ "buy".to_past_tense => "baught"
+ "fight".to_past_tense => "faught"
+ "market".to_past_tense => "marketed"
+ "animate".to_past_tense => "animated"
+ "fluctuate".to_past_tense => "fluctuated"
+ "tag".to_past_tense => "tagged"
+ "feel".to_past_tense => "felt"
Installation
View
@@ -12,6 +12,9 @@ module Inflections
def past_tensed
Inflector.past_tensed(self)
end
+ def to_past_tense
+ past_tensed
+ end
end
end
end

0 comments on commit ed0d52e

Please sign in to comment.