diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-12 20:39:11 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-12 20:39:11 +0000 |
commit | e2b3183fc2c065f8aa9ae77f5ef7d0c8e29744af (patch) | |
tree | c968dc11a0fbf99ad2f6adcb249c7967e469bacb /lib/uri/mailto.rb | |
parent | 78e06ab19423518300a2ef9478cef69468e9d4a9 (diff) |
* re.c (Init_Regexp): Document option constants. Patch by Vincent
Batts. [Ruby 1.9 - Bug #4677]
* lib/uri/common.rb (module URI): Documentation for URI. Patch by
Vincent Batts. [Ruby 1.9- Bug #4677]
* lib/uri/ftp.rb (module URI): ditto
* lib/uri/generic.rb (module URI): ditto
* lib/uri/http.rb (module URI): ditto
* lib/uri/https.rb (module URI): ditto
* lib/uri/ldap.rb (module URI): ditto
* lib/uri/ldaps.rb (module URI): ditto
* lib/uri/mailto.rb (module URI): ditto
* process.c (Init_process): Document Process constants. Patch by
Vincent Batts. [Ruby 1.9- Bug #4677]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/uri/mailto.rb')
-rw-r--r-- | lib/uri/mailto.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/uri/mailto.rb b/lib/uri/mailto.rb index 3edaac93f3..1e8f2da063 100644 --- a/lib/uri/mailto.rb +++ b/lib/uri/mailto.rb @@ -16,8 +16,10 @@ module URI class MailTo < Generic include REGEXP + # A Default port of nil for URI::MailTo DEFAULT_PORT = nil + # An Array of the available components for URI::MailTo COMPONENT = [ :scheme, :to, :headers ].freeze # :stopdoc: @@ -155,6 +157,9 @@ module URI # E-mail headers set by the URL, as an Array of Arrays attr_reader :headers + # check the to +v+ component against either + # * URI::Parser Regexp for :OPAQUE + # * MAILBOX_PATTERN def check_to(v) return true unless v return true if v.size == 0 @@ -168,17 +173,22 @@ module URI end private :check_to + # private setter for to +v+ def set_to(v) @to = v end protected :set_to + # setter for to +v+ def to=(v) check_to(v) set_to(v) v end + # check the headers +v+ component against either + # * URI::Parser Regexp for :OPAQUE + # * HEADER_PATTERN def check_headers(v) return true unless v return true if v.size == 0 @@ -193,6 +203,7 @@ module URI end private :check_headers + # private setter for headers +v+ def set_headers(v) @headers = [] if v @@ -203,12 +214,14 @@ module URI end protected :set_headers + # setter for headers +v+ def headers=(v) check_headers(v) set_headers(v) v end + # Constructs String from URI def to_s @scheme + ':' + if @to |