Module: Inflexion::Methods

Included in:
String
Defined in:
lib/inflexion/methods.rb

Instance Method Summary collapse

Instance Method Details

#pastizeObject



5
6
7
# File 'lib/inflexion/methods.rb', line 5

def pastize
  self.verb.conjugate(tense: :past).split(' ').last
end

#peopleizeObject



9
10
11
12
# File 'lib/inflexion/methods.rb', line 9

def peopleize
  str = (self.last == 'e') ? self.chop : self
  str + 'ers'
end

#progressizeObject



14
15
16
17
18
19
20
21
22
# File 'lib/inflexion/methods.rb', line 14

def progressize
  patch = Inflexion::Patch.new(:progressize, self)

  if patch.exists?
    patch.to_s
  else
    self.verb.conjugate(aspect: :progressive).split(' ').last
  end
end