Method: String#indefinitize
- Defined in:
- lib/jinx/helpers/inflector.rb
#indefinitize ⇒ String
Returns this String with a leading indefinite article.
25 26 27 28 |
# File 'lib/jinx/helpers/inflector.rb', line 25 def indefinitize article = self =~ /^[aeiou]/i ? 'an' : 'a' "#{article} #{self}" end |