Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/horde/core_ext/string.rb
Instance Method Summary collapse
-
#actorize ⇒ Object
actorize(“comment”) # –> commenter actorize(“vote”) # –> voter.
-
#past_tense ⇒ Object
past_tense(“comment”) # –> commented past_tense(“vote”) # –> voted.
Instance Method Details
#actorize ⇒ Object
actorize(“comment”) # –> commenter actorize(“vote”) # –> voter
4 5 6 |
# File 'lib/horde/core_ext/string.rb', line 4 def actorize self =~ /e$/ ? self + "r" : self + "er" end |
#past_tense ⇒ Object
past_tense(“comment”) # –> commented past_tense(“vote”) # –> voted
10 11 12 |
# File 'lib/horde/core_ext/string.rb', line 10 def past_tense self =~ /e$/ ? self + "d" : self + "ed" end |