address.rb
- #
- A
- D
- E
- H
- I
- L
- N
- P
- S
[R] | name | |
[R] | phrase | |
[R] | route | |
[R] | routes |
Source: show
# File rails/actionmailer/lib/action_mailer/vendor/tmail/address.rb, line 48 def initialize( local, domain ) if domain domain.each do |s| raise SyntaxError, 'empty word in domain' if s.empty? end end @local = local @domain = domain @name = nil @routes = [] end
Source: show
# File rails/actionmailer/lib/action_mailer/vendor/tmail/address.rb, line 40 def Address.parse( str ) Parser.parse :ADDRESS, str end
Source: show
# File rails/actionmailer/lib/action_mailer/vendor/tmail/address.rb, line 100 def ==( other ) other.respond_to? :spec and self.spec == other.spec end
Source: show
# File rails/actionmailer/lib/action_mailer/vendor/tmail/address.rb, line 119 def accept( strategy, dummy1 = nil, dummy2 = nil ) unless @local strategy.meta '<>' # empty return-path return end spec_p = (not @name and @routes.empty?) if @name strategy.phrase @name strategy.space end tmp = spec_p ? '' : '<' unless @routes.empty? tmp << @routes.map {|i| '@' + i }.join(',') << ':' end tmp << self.spec tmp << '>' unless spec_p strategy.meta tmp strategy.lwsp '' end
Source: show
# File rails/actionmailer/lib/action_mailer/vendor/tmail/address.rb, line 44 def address_group? false end
Source: show
# File rails/actionmailer/lib/action_mailer/vendor/tmail/address.rb, line 82 def domain return nil unless @domain join_domain(@domain) end
Source: show
# File rails/actionmailer/lib/action_mailer/vendor/tmail/address.rb, line 110 def dup obj = self.class.new(@local.dup, @domain.dup) obj.name = @name.dup if @name obj.routes.replace @routes obj end
Source: show
# File rails/actionmailer/lib/action_mailer/vendor/tmail/address.rb, line 106 def hash @local.hash ^ @domain.hash end
Source: show
# File rails/actionmailer/lib/action_mailer/vendor/tmail/address.rb, line 72 def inspect "#<#{self.class} #{address()}>" end
Source: show
# File rails/actionmailer/lib/action_mailer/vendor/tmail/address.rb, line 76 def local return nil unless @local return '""' if @local.size == 1 and @local[0].empty? @local.map {|i| quote_atom(i) }.join('.') end
Source: show
# File rails/actionmailer/lib/action_mailer/vendor/tmail/address.rb, line 62 def name=( str ) @name = str @name = nil if str and str.empty? end
Source: show
# File rails/actionmailer/lib/action_mailer/vendor/tmail/address.rb, line 87 def spec s = self.local d = self.domain if s and d s + '@' + d else s end end