種類
- インスタンスメソッド (74)
- 定数 (66)
- 特異メソッド (50)
- 文書 (15)
- モジュール関数 (11)
クラス
- Array (19)
-
DRb
:: DRbServer (11) -
Net
:: SMTP (28) -
OpenSSL
:: SSL :: SSLSocket (22) - Socket (44)
- String (11)
-
URI
:: Generic (22)
モジュール
- DRb (11)
-
Socket
:: Constants (33)
キーワード
-
EAI
_ ADDRFAMILY (22) -
EAI
_ NODATA (22) -
EAI
_ NONAME (22) -
NEWS for Ruby 3
. 0 . 0 (4) - gethostname (11)
- host (11)
- new (11)
- pack (19)
- pack テンプレート文字列 (11)
-
post
_ connection _ check (11) - start (28)
-
start
_ service (11) - unpack (11)
検索結果
先頭5件
- Net
:: SMTP . start(address , port = Net :: SMTP . default _ port , helo = & # 39;localhost& # 39; , user = nil , password = nil , authtype = DEFAULT _ AUTH _ TYPE) -> Net :: SMTP - Net
:: SMTP . start(address , port = Net :: SMTP . default _ port , helo = & # 39;localhost& # 39; , user = nil , password = nil , authtype = DEFAULT _ AUTH _ TYPE) {|smtp| . . . . } -> object - NEWS for Ruby 3
. 0 . 0 - URI
:: Generic # host -> String | nil - Socket
:: Constants :: EAI _ NODATA -> Integer
-
Net
:: SMTP . start(address , port = Net :: SMTP . default _ port , helo = & # 39;localhost& # 39; , user = nil , password = nil , authtype = DEFAULT _ AUTH _ TYPE) -> Net :: SMTP (9506.0) -
新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。
...ッションを開始します。
以下と同じです。
require 'net/smtp'
Net::SMTP.new(address, port).start(helo, user, password, authtype)
このメソッドにブロックを与えた場合には、新しく作られた Net::SMTP オブジェクト
を引数としてそのブロック......く作られた Net::SMTP オブジェクトが
返されます。この場合終了時に Net::SMTP#finish を呼ぶのは利用者の責任と
なります。
user と password の両方が与えられた場合、
SMTP AUTH コマンドによって認証を行います。
authtype は使用する......n, :cram_md5 を指定します。
Example:
require 'net/smtp'
Net::SMTP.start('smtp.example.com') {|smtp|
smtp.send_message mail_string, 'from@example.jp', 'to@example.jp'
}
@param address 接続するサーバをホスト名もしくはIPアドレスで指定します
@param port ポ... -
Net
:: SMTP . start(address , port = Net :: SMTP . default _ port , helo = & # 39;localhost& # 39; , user = nil , password = nil , authtype = DEFAULT _ AUTH _ TYPE) {|smtp| . . . . } -> object (9506.0) -
新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。
...ッションを開始します。
以下と同じです。
require 'net/smtp'
Net::SMTP.new(address, port).start(helo, user, password, authtype)
このメソッドにブロックを与えた場合には、新しく作られた Net::SMTP オブジェクト
を引数としてそのブロック......く作られた Net::SMTP オブジェクトが
返されます。この場合終了時に Net::SMTP#finish を呼ぶのは利用者の責任と
なります。
user と password の両方が与えられた場合、
SMTP AUTH コマンドによって認証を行います。
authtype は使用する......n, :cram_md5 を指定します。
Example:
require 'net/smtp'
Net::SMTP.start('smtp.example.com') {|smtp|
smtp.send_message mail_string, 'from@example.jp', 'to@example.jp'
}
@param address 接続するサーバをホスト名もしくはIPアドレスで指定します
@param port ポ... -
NEWS for Ruby 3
. 0 . 0 (9330.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 3.0.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......eprecation warning
# 3.0 => a=>1}, {}]
//}
* Arguments forwarding (`...`) now supports leading arguments.
16378
//emlist{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
end
//}
* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern matching is r......ble.
* Set
* Update to set 1.0.0
* SortedSet has been removed for dependency and performance reasons.
* Set#join is added as a shorthand for `.to_a.join`.
* Set#<=> is added.
* Socket
* Add :connect_timeout to TCPSocket.new 17187
* Net::HTTP
* Net::HTTP#verify_hostname=... -
URI
:: Generic # host -> String | nil (9206.0) -
自身の host を文字列で返します。設定されていない場合は nil を返します。
...自身の host を文字列で返します。設定されていない場合は nil を返します。
@see URI::Generic#hostname... -
Socket
:: Constants :: EAI _ NODATA -> Integer (6316.0) -
No address associated with hostname
...No address associated with hostname
getaddrinfo(3), getnameinfo(3) などの
エラーコードです。
対応する Socket.getaddrinfo, Addrinfo.getaddrinfo などは
エラーを SocketError に変換するため、この定数は直接は利用しません。
@see getaddrinfo(3linux)... -
Socket
:: Constants :: EAI _ NONAME -> Integer (6316.0) -
Hostname nor servname, or not known
...Hostname nor servname, or not known
getaddrinfo(3), getnameinfo(3) などの
エラーコードです。
対応する Socket.getaddrinfo, Addrinfo.getaddrinfo などは
エラーを SocketError に変換するため、この定数は直接は利用しません。
@see getaddrinfo(3linux), gai_stre......rror(3freebsd)... -
Socket
:: EAI _ NODATA -> Integer (6316.0) -
No address associated with hostname
...No address associated with hostname
getaddrinfo(3), getnameinfo(3) などの
エラーコードです。
対応する Socket.getaddrinfo, Addrinfo.getaddrinfo などは
エラーを SocketError に変換するため、この定数は直接は利用しません。
@see getaddrinfo(3linux)... -
Socket
:: EAI _ NONAME -> Integer (6316.0) -
Hostname nor servname, or not known
...Hostname nor servname, or not known
getaddrinfo(3), getnameinfo(3) などの
エラーコードです。
対応する Socket.getaddrinfo, Addrinfo.getaddrinfo などは
エラーを SocketError に変換するため、この定数は直接は利用しません。
@see getaddrinfo(3linux), gai_stre......rror(3freebsd)... -
Array
# pack(template) -> String (3744.0) -
配列の内容を template で指定された文字列にしたがって、 バイナリとしてパックした文字列を返します。
...配列の内容を template で指定された文字列にしたがって、
バイナリとしてパックした文字列を返します。
テンプレートは
型指定文字列とその長さ(省略時は1)を並べたものです。長さと
して * が指定された時は「残りのデ......述べる pack テンプレート文字列の通りです。
@param template 自身のバイナリとしてパックするためのテンプレートを文字列で指定します。
以下にあげるものは、Array#pack、String#unpack
のテンプレート文字の一覧です。テンプ......//emlist[][ruby]{
"\x01\xFE".unpack("H*") # => ["01fe"]
"\x01\xFE".unpack("H3") # => ["01f"]
"~".unpack("H2") # => ["7e"]
["01fe"].pack("H*") # => "\x01\xFE"
["7e"].pack("H2") # => "~"
//}
: c
char (8bit 符号つき整数)
//emlist[][ruby]{
"\x01\xFE".unpack("c*") # => [1, -2]
[1, -2......字列の通りです。
buffer が指定されていれば、バッファとして使って返値として返します。
もし template の最初にオフセット (@) が指定されていれば、
結果はオフセットの後ろから詰められます。
buffer の元の内容がオフセ... -
Array
# pack(template , buffer: String . new) -> String (3744.0) -
配列の内容を template で指定された文字列にしたがって、 バイナリとしてパックした文字列を返します。
...配列の内容を template で指定された文字列にしたがって、
バイナリとしてパックした文字列を返します。
テンプレートは
型指定文字列とその長さ(省略時は1)を並べたものです。長さと
して * が指定された時は「残りのデ......字列の通りです。
buffer が指定されていれば、バッファとして使って返値として返します。
もし template の最初にオフセット (@) が指定されていれば、
結果はオフセットの後ろから詰められます。
buffer の元の内容がオフセ......//emlist[][ruby]{
"\x01\xFE".unpack("H*") # => ["01fe"]
"\x01\xFE".unpack("H3") # => ["01f"]
"~".unpack("H2") # => ["7e"]
["01fe"].pack("H*") # => "\x01\xFE"
["7e"].pack("H2") # => "~"
//}
: c
char (8bit 符号つき整数)
//emlist[][ruby]{
"\x01\xFE".unpack("c*") # => [1, -2]
[1, -2... -
String
# unpack(template) -> Array (3744.0) -
Array#pack で生成された文字列を テンプレート文字列 template にしたがってアンパックし、 それらの要素を含む配列を返します。
...Array#pack で生成された文字列を
テンプレート文字列 template にしたがってアンパックし、
それらの要素を含む配列を返します。
@param template pack テンプレート文字列
@return オブジェクトの配列
以下にあげるもの......//emlist[][ruby]{
"\x01\xFE".unpack("H*") # => ["01fe"]
"\x01\xFE".unpack("H3") # => ["01f"]
"~".unpack("H2") # => ["7e"]
["01fe"].pack("H*") # => "\x01\xFE"
["7e"].pack("H2") # => "~"
//}
: c
char (8bit 符号つき整数)
//emlist[][ruby]{
"\x01\xFE".unpack("c*") # => [1, -2]
[1, -2...... -((n ^ 0xffff_ffff) + 1)
end
n # => -2
//}
: ネットワークバイトオーダの signed long(その2)
//emlist[][ruby]{
s = "\xFF\xFF\xFF\xFE"
n = s.unpack("N").pack("l").unpack("l")[0]
n # => -2
//}
: IPアドレス
//emlist[][ruby]{
require 'socket'
official_hostname, alias_hostnames, addre...