Module: Humanized::Conjunctions
- Defined in:
- lib/humanized/interpolation/conjunctions.rb
Instance Method Summary collapse
Instance Method Details
#and(humanizer, *args) ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/humanized/interpolation/conjunctions.rb', line 21 def and(humanizer, *args) args = args.flatten last = args.pop if args.size == 0 return last.to_s end return [args.join(', '), last].join(' '+humanizer[:and]+' ') end |
#or(humanizer, *args) ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/humanized/interpolation/conjunctions.rb', line 30 def or(humanizer, *args) args = args.flatten last = args.pop if args.size == 0 return last.to_s end return [args.join(', '), last].join(' '+humanizer[:or]+' ') end |