Class: TMail::ContentTypeHeader

Inherits:
StructuredHeader show all
Defined in:
lib/action_mailer/vendor/tmail/header.rb

Constant Summary collapse

PARSE_TYPE =
:CTYPE

Constants inherited from HeaderField

HeaderField::FNAME_TO_CLASS

Constants included from TextUtils

TextUtils::ATOM_UNSAFE, TextUtils::CONTROL_CHAR, TextUtils::MESSAGE_ID, TextUtils::MIME_ENCODED, TextUtils::MONTH, TextUtils::NKF_FLAGS, TextUtils::PHRASE_UNSAFE, TextUtils::RFC2231_ENCODED, TextUtils::TOKEN_UNSAFE, TextUtils::WDAY, TextUtils::ZONESTR_TABLE

Instance Method Summary collapse

Methods inherited from StructuredHeader

#comments

Methods inherited from HeaderField

#accept, #body, #body=, #empty?, #illegal?, #initialize, #inspect, internal_new, new, new_from_port, newobj

Methods included from StrategyInterface

#accept_strategy, create_dest, #decoded, #encoded

Methods included from TextUtils

#atom_safe?, #decode_RFC2231, #decode_params, #join_domain, #message_id?, #mime_encoded?, #quote_atom, #quote_phrase, #quote_token, #time2str, #timezone_string_to_unixtime, #to_kcode, #token_safe?

Constructor Details

This class inherits a constructor from TMail::HeaderField

Instance Method Details

#[](key) ⇒ Object



745
746
747
748
# File 'lib/action_mailer/vendor/tmail/header.rb', line 745

def []( key )
  ensure_parsed
  @params and @params[key]
end

#[]=(key, val) ⇒ Object



750
751
752
753
# File 'lib/action_mailer/vendor/tmail/header.rb', line 750

def []=( key, val )
  ensure_parsed
  (@params ||= {})[key] = val
end

#content_typeObject



735
736
737
738
# File 'lib/action_mailer/vendor/tmail/header.rb', line 735

def content_type
  ensure_parsed
  @sub ? sprintf('%s/%s', @main, @sub) : @main
end

#main_typeObject



715
716
717
718
# File 'lib/action_mailer/vendor/tmail/header.rb', line 715

def main_type
  ensure_parsed
  @main
end

#main_type=(arg) ⇒ Object



720
721
722
723
# File 'lib/action_mailer/vendor/tmail/header.rb', line 720

def main_type=( arg )
  ensure_parsed
  @main = arg.downcase
end

#paramsObject



740
741
742
743
# File 'lib/action_mailer/vendor/tmail/header.rb', line 740

def params
  ensure_parsed
  @params
end

#sub_typeObject



725
726
727
728
# File 'lib/action_mailer/vendor/tmail/header.rb', line 725

def sub_type
  ensure_parsed
  @sub
end

#sub_type=(arg) ⇒ Object



730
731
732
733
# File 'lib/action_mailer/vendor/tmail/header.rb', line 730

def sub_type=( arg )
  ensure_parsed
  @sub = arg.downcase
end