Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/horde/core_ext/string.rb

Instance Method Summary collapse

Instance Method Details

#actorizeObject

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_tenseObject

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