Module: Abbreviations
- Included in:
- Action
- Defined in:
- lib/abbreviations.rb
Instance Method Summary collapse
Instance Method Details
#expand_text(text) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/abbreviations.rb', line 3 def (text) text =~ /\A(\d*)(\S*)/ numbers = $1 word = $2.downcase = (numbers == nil or numbers.empty?) ? ABBREVIATIONS[word] : (ABBREVIATIONS[numbers]+word.capitalize) == nil ? text : .chomp("/") end |