Class: CDMBL::Titlieze

Inherits:
Object
  • Object
show all
Defined in:
lib/cdmbl/formatters.rb

Class Method Summary collapse

Class Method Details

.format(value) ⇒ Object



73
74
75
76
77
78
79
# File 'lib/cdmbl/formatters.rb', line 73

def self.format(value)
  if value.respond_to?(:map)
    value.map(&:titleize)
  else
    value.titleize
  end
end