File: address.rrd.m

package info (click to toggle)
libtmail-ruby 0.10.8-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 860 kB
  • ctags: 1,458
  • sloc: ruby: 8,406; ansic: 678; objc: 584; yacc: 305; makefile: 142
file content (229 lines) | stat: -rw-r--r-- 5,155 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
= Address Classes

== class TMail::Address

=== Class Methods

: parse(str)  ->  TMail::Address | TMail::AddressGroup
    str: String

j
    ʸ str  TMail::Address ޤ TMail::AddressGroup
    ֥Ȥޤstr ᡼륢ɥ쥹Ȥߤʤʤ
    Ȥ㳰 TMail::SyntaxError ȯޤ
e
    parses STR and creates new 'TMail::Address' object.
    If STR did not follow the internet address format,
    'TMail::SyntaxError' exception is raised.
.

: new(locals, domains)  ->  TMail::Address | TMail::AddressGroup
    locals: [String]
    domains: [String]

j
     TMail::Address ֥Ȥޤlocalsdomains Ϥ줾
    ɥ쥹ڥå (...@...) Ρκ¦ȱ¦ɥåȤ split 
    ǤΥ᥽åɤѤǤȤˤʤäƤޤ
    Address.parse ȤäƤ
e
    creates new 'TMail::Address' object consist from local part
    LOCALS and domain part DOMAINS.
.

=== Instance Methods

: address_group?  ->  true | false
j
     false
e
    returns false.
.

: spec -> String
j
    ɥ쥹ڥåʸ ("....@....")
e
    an address spec ("....@....").
.

: routes -> [String]
j
    ϩɽʸ'@' ϴޤޤʤ
e
    delivery routes. Strings do not include character "@".
.

: name -> String
: phrase -> String
j
    ¯˸ɥ쥹Ρ̾ʬǥɤƤޤ
e
    short description for this address (e.g. real name).
.

: encoded(eol = "\r\n", encoding = 'j') -> String
    eol: String
    encoding: String

j
    B 󥳡ɤ줿 RFC2822 ʸɽ֤ޤ
    ɤ eolʸ󥳡ǥ󥰤 encoding Ȥޤ
     encoding  j Ƥޤ
e
    converts this object into MIME-encoded string.
.

: to_s(eol = "\n", encoding = 'e') -> String
: decoded(eol = "\n", encoding = 'e') -> String
    eol: String
    encoding: String

j
    ǥɤ줿 RFC2822 ʸɽ֤ޤ
    ɤ eolʸ󥳡ǥ󥰤 encoding Ȥޤ
e
    converts this object into decoded string.
.

: ==(other) -> true | false
    other: Object

j
    spec ƱȽˤä self  other Ƚꤷޤ
    name  routes ϱƶޤ
e
    judge if self equals to other by inspecting addr-spec string (#spec).
    #name and #routes never affects the return value.
.


== class TMail::AddressGroup

=== Class Methods

: new(name, addrs) -> TMail::AddressGroup
    name: String
    addrs: [TMail::Address | TMail::AddressGroup]

j
     TMail::AddressGroup ֥Ȥޤ
    name ϥ롼̾򼨤ʸaddrs  TMail::Address ޤ
    TMail::AddressGroup ǤʤФޤ
e
    creates new 'TMail::AddressGroup' object.
    NAME is the name of this group, ADDRS is addresses
    which belongs to this group.
.

=== Instance Methods

: address_group?  ->  true | false
j
     true
e
    returns true.
.

: name -> String
j
    롼̾
e
    the human readable name of this group.
.

: addresses -> [TMail::Address | TMail::AddressGroup]
j
    TMail::Address ޤ TMail::AddressGroup ֥Ȥ
e
    addresses which belongs to this group.
.

: to_a -> [TMail::Address | TMail::AddressGroup]
: to_ary -> [TMail::Address | TMail::AddressGroup]
j
    addresses.dup ƱǤ
e
    equals to 'addresses.dup'.
.

: flatten -> [TMail::Address]
j
    ƵŪ TMail::AddressGroup ֥Ȥʿó
    TMail::Address ֥Ȥޤ
e
    flatten this group into one level of array of 'TMail::Address'.
.

: add(addr)
: push(addr)
    addr: TMail::Address | TMail::AddressGroup

j
    TMail::Address ޤ TMail::AddressGroup ֥Ȥ
    Υ롼פɲäޤ
e
    adds an address or an address group to this group.
.

: delete(addr)
    addr: TMail::Address | TMail::AddressGroup

j
    TMail::Address ޤ TMail::AddressGroup ֥Ȥ
    Υ롼פ nil ֤ޤȤȤ
    ɥ쥹롼¸ߤʤ̵뤷 nil ֤ޤ
e
    removes ADDR from this group.
.

: each {|a| .... }
    a: TMail::Address | TMail::AddressGroup

j
    #addresses Ф뷫֤
e
    equals to 'addresses.each {|a| .... }'.
.

: each_address {|a| .... }
    a: TMail::Address

j
    #addresses Ф뷫֤ TMail::AddressGroup ֥Ȥ
    ФƤäƺƵŪ˷֤ޤ
e
    equals to 'flatten.each {|a| .... }'
.

: encoded(eol = "\r\n", encoding = 'j')  ->  String
    eol: String
    encoding: String

j
    ,B 󥳡ɤ줿 ,RFC2822 ʸɽ֤ޤ
e
    converts this object into MIME-encoded string.
.

: decoded(eol = "\n", encoding = 'e')  ->  String
    eol: String
    encoding: String

j
    ǥɤ줿 RFC2822 ʸɽ֤ޤ
e
    converts this object into decoded string.
.

: ==(other)    ->  true | false
: eql?(other)  ->  true | false
    other: Object

j
    #addresses ƱȽˤäƱƤɤȽǤޤ
    #name ϱƶޤ
e
    judges if self is equal to OTHER, by comparing 'self.addresses' and
    'other.addresses'. ('self.name' is meanless)
.