-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use optional record keys for several API options
- Loading branch information
1 parent
0e66e1e
commit 7f3b37e
Showing
8 changed files
with
138 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,11 @@ module URI | |
# RFC6068, the mailto URL scheme. | ||
# | ||
class MailTo < Generic | ||
type build_opts: { | ||
?headers:, Array[Array[String]]? | ||
?to: String? | ||
} | ||
|
||
EMAIL_REGEXP: Regexp | ||
|
||
# <!-- | ||
|
@@ -36,9 +41,9 @@ module URI | |
# m3 = URI::MailTo.build({:to => '[email protected]', :headers => [['subject', 'subscribe']]}) | ||
# m3.to_s # => "mailto:[email protected]?subject=subscribe" | ||
# | ||
def self.build: (Array[String]) -> instance | ||
| ([String, Array[Array[String]]]) -> instance | ||
| (Hash[Symbol, String | Array[Array[String]]]) -> instance | ||
def self.build: (Array[String] args) -> instance | ||
| ([String, Array[Array[String]]] args) -> instance | ||
| (build_opts args) -> instance | ||
|
||
# <!-- rdoc-file=lib/uri/mailto.rb --> | ||
# E-mail headers set by the URL, as an Array of Arrays. | ||
|