Class: Symbol

Inherits:
Object
  • Object
show all
Defined in:
lib/bulkmail/message.rb

Overview

Symbol extensions

Instance Method Summary collapse

Instance Method Details

#to_headerObject

Returns the symbol as a header string



4
5
6
7
8
9
# File 'lib/bulkmail/message.rb', line 4

def to_header
  return @to_header if @to_header
  s = to_s
  @to_header = (s.upcase == s) ? s :
    to_s.split('_').map{|w| w.capitalize}.join('-')
end