osbridge/openconferenceware

View on GitHub
lib/ext/string_possessiveize.rb

Summary

Maintainability
A
0 mins
Test Coverage
class String
  
  # Returns the posessive form of a string.
  def possessiveize
    self + "'" + ([115,83].include?(self[-1]) ? '' : 's')
  end
end