別のキーワード
ライブラリ
- ビルトイン (77)
-
net
/ http (144) -
net
/ pop (12) -
shell
/ process-controller (6) - socket (48)
モジュール
- Kernel (27)
-
Socket
:: Constants (24)
オブジェクト
- main (12)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) -
MSG
_ DONTROUTE (24) -
NEWS for Ruby 3
. 0 . 0 (5) - Ruby用語集 (12)
-
SO
_ DONTROUTE (24) -
USING
_ AT _ EXIT _ WHEN _ PROCESS _ EXIT (6) -
auth
_ only (12) - get (24)
- get2 (24)
- lambda (13)
-
net
/ smtp (12) - new (14)
- post (24)
- post2 (24)
- proc (14)
- refine (12)
-
request
_ get (24) -
request
_ post (24) -
rubygems
/ security (12)
検索結果
先頭5件
-
main
. using(module) -> self (18125.0) -
引数で指定したモジュールで定義された拡張を有効にします。
...ents_rdoc.html#label-Scope
@param module 有効にするモジュールを指定します。
//emlist[例][ruby]{
module Sloth
refine String do
def downcase
self
end
end
end
"ABC".downcase # => "abc"
using Sloth
"ABC".downcase # => "ABC"
//}
@see Module#refine, Module#using... -
Module
# using(module) -> self (18119.0) -
引数で指定したモジュールで定義された拡張を現在のクラス、モジュールで有 効にします。
...ルで有
効にします。
有効にした拡張の有効範囲については以下を参照してください。
* https://docs.ruby-lang.org/en/master/syntax/refinements_rdoc.html#label-Scope
@param module 有効にするモジュールを指定します。
@see Module#refine, main.using... -
Shell
:: ProcessController :: USING _ AT _ EXIT _ WHEN _ PROCESS _ EXIT -> true (6117.0) -
@todo
...@todo... -
rubygems
/ security (156.0) -
このライブラリは暗号署名を RubyGems パッケージに使用するために使用します。
...います。
==== 解説
@todo メソッドではない
あなたが自分の Gem に署名するためには、秘密鍵と自己署名した証明書が必要です。
以下のコマンドを実行するとそれらを作成することができます。
# gemmaster@example.com のための......秘密鍵と証明書を作成します
$ gem cert --build gemmaster@example.com
あなたのコンピュータの性能にもよりますが、これには 5 秒から 10 分程度かかります。
(公開鍵を作成するアルゴリズムは世界で一番速いものを使っているわけ......以下のように "-P HighSecurity" オプションを
付けて Gem をインストールしてみてください。
# install the gem with using the security policy "HighSecurity"
$ sudo gem install Imlib2-Ruby-0.5.0.gem -P HighSecurity
この -P オプションはセキュリティポリ... -
net
/ smtp (78.0) -
メールを送信するためのプロトコル SMTP (Simple Mail Transfer Protocol) を扱うライブラリです。
...smtp|
smtp.send_message(<<-EndOfMail, 'from@example.com', 'to@example.net')
From: Your Name <from@example.com>
To: Dest Address <to@example.net>
Subject: test mail
Date: Sat, 23 Jun 2001 16:26:43 +0900
Message-Id: <unique.message.id.string@yourhost.example.com>
This is a test mail......ように GC 時に勝手に close されることもありません。
# using SMTP#finish
require 'net/smtp'
smtp = Net::SMTP.start('smtp.example.com', 25)
smtp.send_message mail_string, 'from@example.com', 'to@example.net'
smtp.finish
またブロック付きの Net::SMTP.start, Net::......ブロック付きの start を使うのがよいでしょう。
# using block form of SMTP.start
require 'net/smtp'
Net::SMTP.start('smtp.example.com', 25) {|smtp|
smtp.send_message mail_string, 'from@example.com', 'to@example.net'
}
==== 文字列以外からの送信
ひとつ上... -
Net
:: POP3 . auth _ only(address , port = nil , account , password , isapop=false) (54.0) -
POP セッションを開き、認証だけを行って接続を切ります。
...', nil, # using default port (110)
'YourAccount', 'YourPassword')
@param address POP3サーバのホスト名文字列
@param port 接続するPOP3サーバのポート番号
@param account アカウント名文字列
@param password パスワード文字列
@param isapop......用します
@raise Net::POPAuthenticationError 認証に失敗した、もしくはAPOPを利用しようとしたがサーバがAPOPを提供していない場合に発生します
@raise Net::POPError サーバが認証失敗以外のエラーを報告した場合に発生します
@raise Net::P... -
Module
# refine(klass) { . . . } -> Module (42.0) -
引数 klass で指定したクラスまたはモジュールだけに対して、ブロックで指定した機能を提供で きるモジュールを定義します。定義した機能は Module#refine を使用せずに直 接 klass に対して変更を行う場合と異なり、限られた範囲のみ有効にできます。 そのため、既存の機能を局所的に修正したい場合などに用いる事ができます。
.../en/master/syntax/refinements_rdoc.html
定義した機能は main.using, Module#using を実行した場合のみ
有効になります。
@param klass 拡張する対象のクラスまたはモジュールを指定します。
@return ブロックで指定した機能を持つ無名のモジュ......ールを返します。
//emlist[例][ruby]{
class C
def foo
puts "C#foo"
end
end
module M
refine C do
def foo
puts "C#foo in M"
end
end
end
x = C.new
x.foo # => "C#foo"
using M
x = C.new
x.foo # => "C#foo in M"
//}
@see main.using... -
NEWS for Ruby 3
. 0 . 0 (42.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...rue` is used. 17104
* Magic comment `shareable_constant_value` added to freeze constants.
See {Magic Comments}[rdoc-ref:doc/syntax/comments.rdoc@Magic+Comments] for more details.
17273
* A {static analysis}[rdoc-label:label-Static+analysis] foundation is
introduced.
* {RBS}[rdo......* `Mutex` is now acquired per-`Fiber` instead of per-`Thread`. This change should be compatible for essentially all usages and avoids blocking when using a scheduler. 16792
* Proc
* Proc#== and Proc#eql? are now defined and will return true for separate Proc instances if the procs were created......m` class instead of being a `Random` instance, so it can work with `Ractor`. 17322
* `Random::DEFAULT` is deprecated since its value is now confusing and it is no longer global, use `Kernel.rand`/`Random.rand` directly, or create a `Random` instance with `Random.new` instead. 17351
* String... -
Net
:: HTTP # get(path , header = nil , dest = nil) -> Net :: HTTPResponse (30.0) -
サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。
...て順次
「dest << ボディの断片」を実行します。
@param path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
@param dest 利用しないでください。
1.1 互換モード.......html' )
# net/http version 1.2
response = http.get('/index.html')
# compatible in both version
response , = http.get('/index.html')
response.body
# compatible, using block
File.open('save.txt', 'w') {|f|
http.get('/~foo/', nil) do |str|
f.write str
end
}
//}
@see Net::HTTP#request_get... -
Net
:: HTTP # get(path , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse (30.0) -
サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。
...て順次
「dest << ボディの断片」を実行します。
@param path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
@param dest 利用しないでください。
1.1 互換モード.......html' )
# net/http version 1.2
response = http.get('/index.html')
# compatible in both version
response , = http.get('/index.html')
response.body
# compatible, using block
File.open('save.txt', 'w') {|f|
http.get('/~foo/', nil) do |str|
f.write str
end
}
//}
@see Net::HTTP#request_get...