るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
47件ヒット [1-47件を表示] (0.040秒)
トップページ > クエリ:>[x] > クエリ:then[x] > バージョン:2.3.0[x]

別のキーワード

  1. _builtin >
  2. bigdecimal >
  3. module >
  4. integer >
  5. float >

検索結果

Net::IMAP.add_authenticator(auth_type, authenticator) -> () (18901.0)

Net::IMAP#authenticate で使う 認証用クラスを設定します。

Net::IMAP#authenticate で使う
認証用クラスを設定します。

imap ライブラリに新たな認証方式を追加するために用います。

通常は使う必要はないでしょう。もしこれを用いて
認証方式を追加する場合は net/imap.rb の
Net::IMAP::LoginAuthenticator などを参考にしてください。

@param auth_type 認証の種類(文字列)
@param authenticator 認証クラス(Class オブジェクト)

Net::IMAP#authenticate(auth_type, user, password) -> Net::IMAP::TaggedResponse (18601.0)

AUTHENTICATE コマンドを送り、クライアントを認証します。

AUTHENTICATE コマンドを送り、クライアントを認証します。

auth_type で利用する認証方式を文字列で指定します。


例:
imap.authenticate('LOGIN', user, password)

auth_type としては以下がサポートされています。
* "LOGIN"
* "PLAIN"
* "CRAM-MD5"
* "DIGEST-MD5"

@param auth_type 認証方式を表す文字列
@param user ユーザ名文字列
@param password パスワード文字列
@see Net::IMAP#login

Net::SMTP#authenticate(user, secret, authtype) -> () (18601.0)

認証を行います。

認証を行います。

このメソッドはセッション開始(Net::SMTP#start)後、
メールを送る前に呼びだしてください。

通常は Net::SMTP.start や Net::SMTP#start で認証を
行うためこれを利用する必要はないはずです。

@param user 認証で使うアカウント名
@param secret 認証で使うパスワード
@param authtype 認証の種類(:plain, :login, :cram_md5 のいずれか)

@see Net::SMTP.start, Net::SMTP#start, Net::SMTP#auth_plain, Net:...

Socket::Constants::SO_SECURITY_AUTHENTICATION -> Integer (18601.0)

@todo

@todo

Socket::SO_SECURITY_AUTHENTICATION -> Integer (18601.0)

@todo

@todo

絞り込み条件を変える

WEBrick::HTTPAuth::BasicAuth#authenticate(request, response) -> bool (18601.0)

クライアントから送られてきたユーザ名とパスワードを認証します。 認証に失敗した場合は challenge を呼びます。

クライアントから送られてきたユーザ名とパスワードを認証します。
認証に失敗した場合は challenge を呼びます。

@param request WEBrick::HTTPRequest のインスタンスを指定します。

@param response WEBrick::HTTPResponse のインスタンスを指定します。

@raise WEBrick::HTTPStatus::Unauthorized 認証に失敗した場合に発生します。

WEBrick::HTTPAuth::DigestAuth#authenticate(request, response) -> true (18601.0)

クライアントから送られてきたユーザ名とパスワードを認証します。 認証に失敗した場合は challenge を呼びます。

クライアントから送られてきたユーザ名とパスワードを認証します。
認証に失敗した場合は challenge を呼びます。

@param request WEBrick::HTTPRequest のインスタンスを指定します。

@param response WEBrick::HTTPResponse のインスタンスを指定します。

@raise WEBrick::HTTPStatus::Unauthorized 認証に失敗した場合に発生します。

WEBrick::HTTPAuth::ProxyAuthenticator::InfoField -> "Proxy-Authentication-Info" (9601.0)

キーの名前です。

キーの名前です。

WEBrick::HTTPAuth::ProxyAuthenticator::ResponseField -> "Proxy-Authenticate" (9601.0)

レスポンスフィールドのキーの名前です。

レスポンスフィールドのキーの名前です。

Prime::EratosthenesGenerator#next -> Integer (9301.0)

次の(擬似)素数を返します。なお、この実装においては擬似素数は真に素数です。

次の(擬似)素数を返します。なお、この実装においては擬似素数は真に素数です。

また内部的な列挙位置を進めます。

//emlist[例][ruby]{
require 'prime'
generator = Prime::EratosthenesGenerator.new
p generator.next #=> 2
p generator.next #=> 3
p generator.succ #=> 5
p generator.succ #=> 7
p generator.next #=> 11
//}

絞り込み条件を変える

Prime::EratosthenesGenerator#rewind -> nil (9301.0)

列挙状態を巻き戻します。

列挙状態を巻き戻します。

//emlist[例][ruby]{
require 'prime'
generator = Prime::EratosthenesGenerator.new
p generator.next #=> 2
p generator.next #=> 3
p generator.next #=> 5

generator.rewind

p generator.next #=> 2
//}

Prime::EratosthenesGenerator#succ -> Integer (9301.0)

次の(擬似)素数を返します。なお、この実装においては擬似素数は真に素数です。

次の(擬似)素数を返します。なお、この実装においては擬似素数は真に素数です。

また内部的な列挙位置を進めます。

//emlist[例][ruby]{
require 'prime'
generator = Prime::EratosthenesGenerator.new
p generator.next #=> 2
p generator.next #=> 3
p generator.succ #=> 5
p generator.succ #=> 7
p generator.next #=> 11
//}

WEBrick::HTTPAuth::Authenticator#logger -> object (9301.0)

ロガーオブジェクトを返します。

ロガーオブジェクトを返します。

WEBrick::HTTPAuth::Authenticator#realm -> String (9301.0)

レルムを返します。

レルムを返します。

WEBrick::HTTPAuth::Authenticator#userdb -> WEBrick::HTTPAuth::Htpasswd | WEBrick::HTTPAuth::Htdigest (9301.0)

認証のためのユーザデータベースを返します。

認証のためのユーザデータベースを返します。

@see WEBrick::HTTPAuth::BasicAuth, WEBrick::HTTPAuth::Htdigest

絞り込み条件を変える

WEBrick::HTTPAuth::Authenticator::AuthException -> Class (9301.0)

認証失敗時に発生する例外のクラスです。

認証失敗時に発生する例外のクラスです。

WEBrick::HTTPAuth::Authenticator::AuthScheme -> nil (9301.0)

認証方法を表わします。派生クラスで上書きしなければなりません。

認証方法を表わします。派生クラスで上書きしなければなりません。

WEBrick::HTTPAuth::Authenticator::RequestField -> String (9301.0)

リクエストフィールドのキーの名前です。

リクエストフィールドのキーの名前です。

WEBrick::HTTPAuth::Authenticator::ResponseField -> String (9301.0)

レスポンスフィールドのキーの名前です。

レスポンスフィールドのキーの名前です。

WEBrick::HTTPAuth::Authenticator::ResponseInfoField -> String (9301.0)

レスポンスインフォフィールドのキーの名前です。

レスポンスインフォフィールドのキーの名前です。

絞り込み条件を変える

WEBrick::HTTPAuth::ProxyAuthenticator::AuthException -> Class (9301.0)

WEBrick::HTTPStatus::ProxyAuthenticationRequired です。

WEBrick::HTTPStatus::ProxyAuthenticationRequired です。

WEBrick::HTTPAuth::ProxyAuthenticator::RequestField -> "Proxy-Authorization" (9301.0)

リクエストフィールドのキーの名前です。

リクエストフィールドのキーの名前です。

Prime#each(upper_bound = nil, generator = EratosthenesGenerator.new) -> Enumerator (601.0)

全ての素数を順番に与えられたブロックに渡して評価します。

全ての素数を順番に与えられたブロックに渡して評価します。

@param upper_bound 任意の正の整数を指定します。列挙の上界です。
nil が与えられた場合は無限に列挙し続けます。

@param generator 素数生成器のインスタンスを指定します。

@return ブロックの最後に評価された値を返します。
ブロックが与えられなかった場合は、Enumerator と互換性のある外部イテレータを返します。

//emlist[例][ruby]{
require 'prime'
Prime.each(6){|prime| ...

Prime#each(upper_bound = nil, generator = EratosthenesGenerator.new) {|prime| ... } -> object (601.0)

全ての素数を順番に与えられたブロックに渡して評価します。

全ての素数を順番に与えられたブロックに渡して評価します。

@param upper_bound 任意の正の整数を指定します。列挙の上界です。
nil が与えられた場合は無限に列挙し続けます。

@param generator 素数生成器のインスタンスを指定します。

@return ブロックの最後に評価された値を返します。
ブロックが与えられなかった場合は、Enumerator と互換性のある外部イテレータを返します。

//emlist[例][ruby]{
require 'prime'
Prime.each(6){|prime| ...

Prime.each(upper_bound = nil, generator = EratosthenesGenerator.new) -> Enumerator (601.0)

Prime.instance.each と同じです。

Prime.instance.each と同じです。

@param upper_bound 任意の正の整数を指定します。列挙の上界です。
nil が与えられた場合は無限に列挙し続けます。

@param generator 素数生成器のインスタンスを指定します。

@return ブロックの最後に評価された値を返します。
ブロックが与えられなかった場合は、Enumerator と互換性のある外部イテレータを返します。


@see Prime#each

絞り込み条件を変える

Prime.each(upper_bound = nil, generator = EratosthenesGenerator.new) {|prime| ... } -> object (601.0)

Prime.instance.each と同じです。

Prime.instance.each と同じです。

@param upper_bound 任意の正の整数を指定します。列挙の上界です。
nil が与えられた場合は無限に列挙し続けます。

@param generator 素数生成器のインスタンスを指定します。

@return ブロックの最後に評価された値を返します。
ブロックが与えられなかった場合は、Enumerator と互換性のある外部イテレータを返します。


@see Prime#each

CGI::HtmlExtension#html(attributes = {}) -> String (589.0)

トップレベルの html 要素を生成します。 ブロックを与えると、ブロックを評価した結果が内容になります。

トップレベルの html 要素を生成します。
ブロックを与えると、ブロックを評価した結果が内容になります。

@param attributes 属性をハッシュで指定します。
擬似属性の "PRETTY" に文字列を与えるとその文字列でインデントした HTML を生成します。
擬似属性の "DOCTYPE" には DOCTYPE 宣言として使用する文字列を与えることができます。

例:

html{ "string" }
# <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2...

CGI::HtmlExtension#html(attributes = {}) { ... } -> String (589.0)

トップレベルの html 要素を生成します。 ブロックを与えると、ブロックを評価した結果が内容になります。

トップレベルの html 要素を生成します。
ブロックを与えると、ブロックを評価した結果が内容になります。

@param attributes 属性をハッシュで指定します。
擬似属性の "PRETTY" に文字列を与えるとその文字列でインデントした HTML を生成します。
擬似属性の "DOCTYPE" には DOCTYPE 宣言として使用する文字列を与えることができます。

例:

html{ "string" }
# <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2...

Time.strptime(date, format, now=self.now) -> Time (409.0)

文字列を Date._strptime を用いて Time オブジェクト に変換します。

文字列を Date._strptime を用いて Time オブジェクト
に変換します。

require 'time'
Time.strptime('2001-02-03T04:05:06+09:00', '%Y-%m-%dT%H:%M:%S%z')
#=> 2001-02-03 06:05:06 +0900

ブロックを渡すと年の部分をブロックによって変換できます。
require 'time'
Time.strptime('91/5/18 4:13:00', '%Y/%m/%d %T'){|y|
if y > 100 then y
elsif y >...

Time.strptime(date, format, now=self.now) {|y| ... } -> Time (409.0)

文字列を Date._strptime を用いて Time オブジェクト に変換します。

文字列を Date._strptime を用いて Time オブジェクト
に変換します。

require 'time'
Time.strptime('2001-02-03T04:05:06+09:00', '%Y-%m-%dT%H:%M:%S%z')
#=> 2001-02-03 06:05:06 +0900

ブロックを渡すと年の部分をブロックによって変換できます。
require 'time'
Time.strptime('91/5/18 4:13:00', '%Y/%m/%d %T'){|y|
if y > 100 then y
elsif y >...

絞り込み条件を変える

Proc#===(*arg) -> () (391.0)

手続きオブジェクトを実行してその結果を返します。

手続きオブジェクトを実行してその結果を返します。

引数の渡され方はオブジェクトの生成方法によって異なります。
詳しくは Proc#lambda? を参照してください。

「===」は when の所に手続きを渡せるようにするためのものです。

//emlist[例][ruby]{
def sign(n)
case n
when lambda{|n| n > 0} then 1
when lambda{|n| n < 0} then -1
else 0
end
end

p sign(-4) #=> -1
p sign(0) #=> 0
p sign(7) #=> 1...

Proc#[](*arg) -> () (391.0)

手続きオブジェクトを実行してその結果を返します。

手続きオブジェクトを実行してその結果を返します。

引数の渡され方はオブジェクトの生成方法によって異なります。
詳しくは Proc#lambda? を参照してください。

「===」は when の所に手続きを渡せるようにするためのものです。

//emlist[例][ruby]{
def sign(n)
case n
when lambda{|n| n > 0} then 1
when lambda{|n| n < 0} then -1
else 0
end
end

p sign(-4) #=> -1
p sign(0) #=> 0
p sign(7) #=> 1...

Proc#call(*arg) -> () (391.0)

手続きオブジェクトを実行してその結果を返します。

手続きオブジェクトを実行してその結果を返します。

引数の渡され方はオブジェクトの生成方法によって異なります。
詳しくは Proc#lambda? を参照してください。

「===」は when の所に手続きを渡せるようにするためのものです。

//emlist[例][ruby]{
def sign(n)
case n
when lambda{|n| n > 0} then 1
when lambda{|n| n < 0} then -1
else 0
end
end

p sign(-4) #=> -1
p sign(0) #=> 0
p sign(7) #=> 1...

Proc#yield(*arg) -> () (391.0)

手続きオブジェクトを実行してその結果を返します。

手続きオブジェクトを実行してその結果を返します。

引数の渡され方はオブジェクトの生成方法によって異なります。
詳しくは Proc#lambda? を参照してください。

「===」は when の所に手続きを渡せるようにするためのものです。

//emlist[例][ruby]{
def sign(n)
case n
when lambda{|n| n > 0} then 1
when lambda{|n| n < 0} then -1
else 0
end
end

p sign(-4) #=> -1
p sign(0) #=> 0
p sign(7) #=> 1...

Kernel#check_signedness(type, headers = nil, opts = nil) -> "signed" | "unsigned" | nil (349.0)

Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.

Returns the signedness of the given +type+. You may optionally
specify additional +headers+ to search in for the +type+.

If the +type+ is found and is a numeric type, a macro is passed as a
preprocessor constant to the compiler using the +type+ name, in
uppercase, prepended with 'SIGNEDNESS...

絞り込み条件を変える

Kernel#check_signedness(type, headers = nil, opts = nil) { ... } -> "signed" | "unsigned" | nil (349.0)

Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.

Returns the signedness of the given +type+. You may optionally
specify additional +headers+ to search in for the +type+.

If the +type+ is found and is a numeric type, a macro is passed as a
preprocessor constant to the compiler using the +type+ name, in
uppercase, prepended with 'SIGNEDNESS...

Gem::DependencyList#dependency_order -> [Gem::Specification] (337.0)

依存する Gem の数が少ない順にソートされた Gem::Specification のリストを返します。

依存する Gem の数が少ない順にソートされた Gem::Specification のリストを返します。

このことは、インストール済みの Gem を削除するときに便利です。
このメソッドで返された順にインストール済みの Gem 削除すると、
依存関係による多くの問題を回避することができます。

If there are circular dependencies (yuck!), then gems will be
returned in order until only the circular dependents and anything
they reference are le...

Rake::FileList#exclude(*patterns) {|entry| ... } -> self (337.0)

自身から取り除くべきファイル名のパターンを自身の除外リストに登録します。

自身から取り除くべきファイル名のパターンを自身の除外リストに登録します。

パターンとして正規表現、グロブパターン、文字列が使用可能です。
さらにブロックが与えられた場合は、ブロックを評価して真になったエントリを削除します。

グロブパターンはファイルシステムに対して展開されます。
もし、ファイルシステムに存在しないファイルを明示的にリストへ追加した場合、
グロブパターンではそのファイルをリストから削除しません。

例:
FileList['a.c', 'b.c'].exclude("a.c") # => ['b.c']
FileList['a.c', 'b.c'].exclude(...

WIN32OLE::ARGV -> [object] (337.0)

直前のメソッド呼び出しの引数を格納した配列です。

直前のメソッド呼び出しの引数を格納した配列です。

OLEオートメーションでは呼び出し先が引数に対して値を設定できます。しかし、
Rubyのメソッド引数は値のみを取るため、そのままでは呼び出し先が設定した
値を参照できません。このような場合、ARGVを参照することで呼び出し先の設
定値を参照できます。

以下のリストは、VBで開発したオブジェクトのメソッド呼び出しを例としてい
ます。このメソッド(Accm)は、第1引数で指定した演算を第2引数と第3引数に
適用し、結果を第2引数に設定します。

' VB (OLE Automation server)
Public Sub Accm(...

Timeout.#timeout(sec, exception_class = nil) {|i| ... } -> object (319.0)

ブロックを sec 秒の期限付きで実行します。 ブロックの実行時間が制限を過ぎたときは例外 Timeout::Error が発生します。

ブロックを sec 秒の期限付きで実行します。
ブロックの実行時間が制限を過ぎたときは例外
Timeout::Error が発生します。

exception_class を指定した場合には Timeout::Error の代わりに
その例外が発生します。
ブロックパラメータ i は sec がはいります。

また sec が 0 もしくは nil のときは制限時間なしで
ブロックを実行します。

@param sec タイムアウトする時間を秒数で指定します.
@param exception_class タイムアウトした時、発生させる例外を指定します.

例 長い計算のタイムアウト
r...

絞り込み条件を変える

制御構造 (271.0)

制御構造 条件分岐: * if * unless * case 繰り返し: * while * until * for * break * next * redo * retry 例外処理: * raise * begin その他: * return * BEGIN * END

制御構造
条件分岐:
* if
* unless
* case
繰り返し:
* while
* until
* for
* break
* next
* redo
* retry
例外処理:
* raise
* begin
その他:
* return
* BEGIN
* END

Rubyでは(Cなどとは異なり)制御構造は式であって、何らかの値を返すものが
あります(返さないものもあります。値を返さない式を代入式の右辺に置くと
syntax error になります)。

R...

Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (181.0)

Rubyで使われる記号の意味(正規表現の複雑な記号は除く) ex q num per and or  plus minus ast slash hat sq  period comma langl rangl eq tilde  dollar at under lbrarbra  lbra2rbra2 lbra3rbra3 dq colon ac  backslash semicolon

Rubyで使われる記号の意味(正規表現の複雑な記号は除く)
ex q num per and or 
plus minus ast slash hat sq 
period comma langl rangl eq tilde 
dollar at under lbrarbra 
lbra2rbra2 lbra3rbra3 dq colon ac 
backslash semicolon

===[a:ex] !

: !true

not 演算子。d:spec/operator#notを参照。

: 3 != 5

「等しくない」比較演算子。d:spec/operator#notを参...

クラス/メソッドの定義 (181.0)

クラス/メソッドの定義 * クラス/メソッドの定義: * class * singleton_class * module * method * operator * nest_method * eval_method * singleton_method * class_method * limit * 定義に関する操作: * alias * undef * defined

クラス/メソッドの定義
* クラス/メソッドの定義:
* class
* singleton_class
* module
* method
* operator
* nest_method
* eval_method
* singleton_method
* class_method
* limit
* 定義に関する操作:
* alias
* undef
* defined

===[a:class] クラス定義

//emlist[例][ruby]{
class Foo < S...

Numeric (73.0)

数値を表す抽象クラスです。Integer や Float などの数値クラス は Numeric のサブクラスとして実装されています。

数値を表す抽象クラスです。Integer や Float などの数値クラス
は Numeric のサブクラスとして実装されています。

演算や比較を行うメソッド(+, -, *, /, <=>)は Numeric のサブクラスで定義されま
す。Numeric で定義されているメソッドは、サブクラスで提供されているメソッド
(+, -, *, /, %) を利用して定義されるものがほとんどです。
つまり Numeric で定義されているメソッドは、Numeric のサブクラスとして新たに数値クラスを定義した時に、
演算メソッド(+, -, *, /, %, <=>, coerce)だけを定義すれ...

xmlrpc (73.0)

XML-RPC を扱うためのライブラリです。

XML-RPC を扱うためのライブラリです。

このページは xmlrpc ライブラリのまとめのページであり、require 'xmlrpc' を実行しても
エラーになることに注意して下さい。

=== Author and Copyright

Copyright (C) 2001-2004 by Michael Neumann

Released under the same term of license as Ruby.

=== Overview

XMLRPC is a lightweight protocol that enables remote procedure calls...

絞り込み条件を変える

演算子式 (55.0)

演算子式 * assign * selfassign * multiassign * range * range_cond * and * or * not * cond

演算子式
* assign
* selfassign
* multiassign
* range
* range_cond
* and
* or
* not
* cond

//emlist[例][ruby]{
1+2*3/4
//}

プログラミングの利便のために一部のメソッド呼び出しと制御構造は演算子形
式をとります。Rubyには以下にあげる演算子があります。

高い ::
[]
+(単項) ! ~
**
...

TCPSocket (37.0)

インターネットドメインのストリーム型ソケットのクラスです。

インターネットドメインのストリーム型ソケットのクラスです。

通常のIO クラスのサブクラスと同
様の入出力ができます。このクラスによってソケットを用いたクラ
イアントを簡単に記述できるようになります。

ユーザの入力をそのままサーバに転送するプログラムは以下の
ようになります。

require "socket"

port = if ARGV.size > 0 then ARGV.shift else 4444 end
print port, "\n"

s = TCPSocket.open("localhost", port)

while gets
...