モジュール
- GC (12)
-
Gem
:: Security (12) - OpenURI (24)
キーワード
- compact (6)
-
enable
_ ssl (12) - new (24)
-
open
_ uri (24) - start (32)
-
verify
_ compaction _ references (6) -
verify
_ trust _ dir (12)
検索結果
先頭5件
- Net
:: POP3 . verify -> Integer|nil - GC
. verify _ compaction _ references(toward: nil , double _ heap: nil) -> Hash - OpenURI
. open _ uri(name , mode = & # 39;r& # 39; , perm = nil , options = {}) -> StringIO - OpenURI
. open _ uri(name , mode = & # 39;r& # 39; , perm = nil , options = {}) {|sio| . . . } -> nil - Gem
:: Security . verify _ trust _ dir(path , perms)
-
Net
:: POP3 . verify -> Integer|nil (21124.0) -
SSL のパラメータの verify_mode を返します。
...SSL のパラメータの verify_mode を返します。
設定されていない場合は nil を返します。
@see OpenSSL::SSL::SSLContext#verify_mode... -
GC
. verify _ compaction _ references(toward: nil , double _ heap: nil) -> Hash (12202.0) -
コンパクションの参照の一貫性を検証します。
...ークスタックにプッシュされて、
SEGV が起きるでしょう。
@param toward nil か :empty を指定します。
@param double_heap ヒープサイズを2倍にするかどうかを真偽値で指定します。
@return GC.compact の返り値と同じです。
@see GC.compact... -
OpenURI
. open _ uri(name , mode = & # 39;r& # 39; , perm = nil , options = {}) -> StringIO (9225.0) -
URI である文字列 name のリソースを取得して StringIO オブジェクト として返します。
...uire 'open-uri'
sio = OpenURI.open_uri('http://www.example.com')
p sio.last_modified
puts sio.read
OpenURI.open_uri('http://www.example.com'){|sio| sio.read }
options には Hash を与えます。理解するハッシュの
キーは以下のシンボル、
* :proxy
* :progress_proc
*......:content_length_proc
* :http_basic_authentication
* :proxy_http_basic_authentication
* :read_timeout
* :ssl_ca_cert
* :ssl_verify_mode
* :ftp_active_mode
* :redirect
です。
「:content_length_proc」と「:progress_proc」はプログレスバーに
利用されることを想定してい......ます。
require 'open-uri'
sio = OpenURI.open_uri('http://www.example.com',
{ :proxy => 'http://proxy.example.com:8000/',
:http_basic_authentication => [username, password] })
: :proxy
プロクシの設定をします。
値には以下... -
OpenURI
. open _ uri(name , mode = & # 39;r& # 39; , perm = nil , options = {}) {|sio| . . . } -> nil (9225.0) -
URI である文字列 name のリソースを取得して StringIO オブジェクト として返します。
...uire 'open-uri'
sio = OpenURI.open_uri('http://www.example.com')
p sio.last_modified
puts sio.read
OpenURI.open_uri('http://www.example.com'){|sio| sio.read }
options には Hash を与えます。理解するハッシュの
キーは以下のシンボル、
* :proxy
* :progress_proc
*......:content_length_proc
* :http_basic_authentication
* :proxy_http_basic_authentication
* :read_timeout
* :ssl_ca_cert
* :ssl_verify_mode
* :ftp_active_mode
* :redirect
です。
「:content_length_proc」と「:progress_proc」はプログレスバーに
利用されることを想定してい......ます。
require 'open-uri'
sio = OpenURI.open_uri('http://www.example.com',
{ :proxy => 'http://proxy.example.com:8000/',
:http_basic_authentication => [username, password] })
: :proxy
プロクシの設定をします。
値には以下... -
Gem
:: Security . verify _ trust _ dir(path , perms) (6202.0) -
信頼するディレクトリが存在することを確認します。
...作成してパーミッションを変更します。
@param path 確認するパスを指定します。
@param perms ディレクトリを作成する場合のパーミッションを指定します。
@raise Gem::Security::Exception path がディレクトリでない場合に発生します... -
GC
. compact -> Hash (6107.0) -
ヒープをコンパクションします。
...ヒープをコンパクションします。
詳細は15626を参照してください。
@see GC.verify_compaction_references... -
Net
:: SMTP . start(address , port = Net :: SMTP . default _ port , tls _ verify: true , tls _ hostname: nil , helo: & # 39;localhost& # 39; , user: nil , password: nil , authtype: DEFAULT _ AUTH _ TYPE) -> Net :: SMTP (3309.0) -
新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。
...新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。
以下と同じです。
require 'net/smtp'
Net::SMTP.new(address, port).start(helo: helo, user: user, password: password, authtype: authtype)
このメソッドにブロックを与......Net::SMTP オブジェクト
を引数としてそのブロックを呼び、ブロック終了時に自動的に接続を閉じます。
ブロックを与えなかった場合には新しく作られた Net::SMTP オブジェクトが
返されます。この場合終了時に Net::SMTP#finish...... password の両方が与えられた場合、
SMTP AUTH コマンドによって認証を行います。
authtype は使用する認証のタイプで、
シンボルで :plain, :login, :cram_md5 を指定します。
Example:
require 'net/smtp'
Net::SMTP.start('smtp.example.com') {|smtp|... -
Net
:: SMTP . start(address , port = Net :: SMTP . default _ port , tls _ verify: true , tls _ hostname: nil , helo: & # 39;localhost& # 39; , user: nil , password: nil , authtype: DEFAULT _ AUTH _ TYPE) {|smtp| . . . } -> object (3309.0) -
新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。
...新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。
以下と同じです。
require 'net/smtp'
Net::SMTP.new(address, port).start(helo: helo, user: user, password: password, authtype: authtype)
このメソッドにブロックを与......Net::SMTP オブジェクト
を引数としてそのブロックを呼び、ブロック終了時に自動的に接続を閉じます。
ブロックを与えなかった場合には新しく作られた Net::SMTP オブジェクトが
返されます。この場合終了時に Net::SMTP#finish...... password の両方が与えられた場合、
SMTP AUTH コマンドによって認証を行います。
authtype は使用する認証のタイプで、
シンボルで :plain, :login, :cram_md5 を指定します。
Example:
require 'net/smtp'
Net::SMTP.start('smtp.example.com') {|smtp|... -
Net
:: IMAP . new(host , port = 143 , usessl = false , certs = nil , verify = true) -> Net :: IMAP (3238.0) -
新たな Net::IMAP オブジェクトを生成し、指定したホストの 指定したポートに接続し、接続語の IMAP オブジェクトを返します。
...たな Net::IMAP オブジェクトを生成し、指定したホストの
指定したポートに接続し、接続語の IMAP オブジェクトを返します。
usessl が真ならば、サーバに繋ぐのに SSL/TLS を用います。
SSL/TLS での接続には OpenSSL と openssl が使え......列で渡します。
certs に nil を渡すと、OpenSSL のデフォルトの証明書を使います。
verify は接続先を検証するかを真偽値で設定します。
真が OpenSSL::SSL::VERIFY_PEER に、
偽が OpenSSL::SSL::VERIFY_NONE に対応します。
パラメータは Hash......。
* :port ポート番号
省略時は SSL/TLS 使用時→993 不使用時→143 となります。
* :ssl OpenSSL に渡すパラメータをハッシュで指定します。
省略時は SSL/TLS を使わず接続します。
これで渡せるパラメータは
OpenSSL::SSL... -
Net
:: POP3 . enable _ ssl(verify _ or _ params={} , certs=nil) -> () (3238.0) -
新しく生成する Net::POP3 オブジェクトが SSL による通信利用するように設定します。
...しく生成する Net::POP3 オブジェクトが
SSL による通信利用するように設定します。
verify_or_params にハッシュを渡した場合には、接続時に生成される
OpenSSL::SSL::SSLContext オブジェクトの
OpenSSL::SSL::SSLContext#set_params に渡されます......。
verify_or_params がハッシュでない場合には、接続時に生成される
OpenSSL::SSL::SSLContext オブジェクトの
OpenSSL::SSL::SSLContext#set_params に
{ :verify_mode => verify_or_params, :ca_path => certs }
というハッシュが渡されます。
@param verify_or_param......s SSLの設定のハッシュ、もしくは SSL の verify_mode
@param certs SSL の ca_path
@see Net::POP3.disable_ssl, Net::POP3.use_ssl?... -
Net
:: SMTP . start(address , port = Net :: SMTP . default _ port , helo = & # 39;localhost& # 39; , user = nil , password = nil , authtype = DEFAULT _ AUTH _ TYPE) -> Net :: SMTP (3209.0) -
新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。
...新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。
以下と同じです。
require 'net/smtp'
Net::SMTP.new(address, port).start(helo: helo, user: user, password: password, authtype: authtype)
このメソッドにブロックを与......Net::SMTP オブジェクト
を引数としてそのブロックを呼び、ブロック終了時に自動的に接続を閉じます。
ブロックを与えなかった場合には新しく作られた Net::SMTP オブジェクトが
返されます。この場合終了時に Net::SMTP#finish...... password の両方が与えられた場合、
SMTP AUTH コマンドによって認証を行います。
authtype は使用する認証のタイプで、
シンボルで :plain, :login, :cram_md5 を指定します。
Example:
require 'net/smtp'
Net::SMTP.start('smtp.example.com') {|smtp|... -
Net
:: SMTP . start(address , port = Net :: SMTP . default _ port , helo = & # 39;localhost& # 39; , user = nil , password = nil , authtype = DEFAULT _ AUTH _ TYPE) {|smtp| . . . . } -> object (3209.0) -
新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。
...新しい SMTP オブジェクトを生成し、サーバに接続し、セッションを開始します。
以下と同じです。
require 'net/smtp'
Net::SMTP.new(address, port).start(helo: helo, user: user, password: password, authtype: authtype)
このメソッドにブロックを与......Net::SMTP オブジェクト
を引数としてそのブロックを呼び、ブロック終了時に自動的に接続を閉じます。
ブロックを与えなかった場合には新しく作られた Net::SMTP オブジェクトが
返されます。この場合終了時に Net::SMTP#finish...... password の両方が与えられた場合、
SMTP AUTH コマンドによって認証を行います。
authtype は使用する認証のタイプで、
シンボルで :plain, :login, :cram_md5 を指定します。
Example:
require 'net/smtp'
Net::SMTP.start('smtp.example.com') {|smtp|...