Module: Humanized::English::Articles
- Included in:
- Humanized::English
- Defined in:
- lib/humanized/interpolation/english.rb
Instance Method Summary collapse
- #a(humanizer, *args) ⇒ Object
- #no(humanizer, *args) ⇒ Object
- #some(humanizer, *args) ⇒ Object
- #the(humanizer, *args) ⇒ Object
Instance Method Details
#a(humanizer, *args) ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/humanized/interpolation/english.rb', line 23 def a(humanizer, *args) Wrapper.wrap(args) do |t| fs = first_sound(humanizer, t) s = t.to_s if( fs.nil? ) fs = guess_first_sound(s) end (fs == :vowel ? 'an' : 'a' ) + ' ' + s end end |
#no(humanizer, *args) ⇒ Object
40 41 42 43 44 |
# File 'lib/humanized/interpolation/english.rb', line 40 def no(humanizer, *args) Wrapper.wrap(args) do |t| 'no ' + t.to_s end end |