instance method []

Ruby on Rails 2.2.3

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

[]( key )

Returns a TMail::AddressHeader object of the field you are querying. Examples:

@mail['from']  #=> #<TMail::AddressHeader "mikel@test.com.au">
@mail['to']    #=> #<TMail::AddressHeader "mikel@test.com.au">

You can get the string value of this by passing “to_s” to the query: Example:

@mail['to'].to_s #=> "mikel@test.com.au"

Parameters

key req
Source
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb, line 247
    def []( key )
      @header[key.downcase]
    end

Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/mail.rb line 247 · View on GitHub · Improve this page · Find usages on GitHub

Defined in TMail::Mail

Type at least 2 characters to search.

↑↓ navigate · open · esc close