るりまサーチ (Ruby 2.7.0)

最速Rubyリファレンスマニュアル検索!
30件ヒット [1-30件を表示] (0.106秒)

別のキーワード

  1. object then
  2. _builtin then
  3. then object
  4. then _builtin

検索結果

Object#then -> Enumerator (54328.0)

self を引数としてブロックを評価し、ブロックの結果を返します。

self を引数としてブロックを評価し、ブロックの結果を返します。

//emlist[例][ruby]{
3.next.then {|x| x**x }.to_s # => "256"
"my string".yield_self {|s| s.upcase } # => "MY STRING"
//}

値をメソッドチェインのパイプラインに次々と渡すのは良い使い方です。

//emlist[メソッドチェインのパイプライン][ruby]{
require 'open-uri'
require 'json'

construct_url(arguments).
...

Object#then {|x| ... } -> object (54328.0)

self を引数としてブロックを評価し、ブロックの結果を返します。

self を引数としてブロックを評価し、ブロックの結果を返します。

//emlist[例][ruby]{
3.next.then {|x| x**x }.to_s # => "256"
"my string".yield_self {|s| s.upcase } # => "MY STRING"
//}

値をメソッドチェインのパイプラインに次々と渡すのは良い使い方です。

//emlist[メソッドチェインのパイプライン][ruby]{
require 'open-uri'
require 'json'

construct_url(arguments).
...

Net::IMAP#authenticate(auth_type, user, password) -> Net::IMAP::TaggedResponse (18304.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) -> () (18304.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:...

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

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

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

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

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

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

絞り込み条件を変える

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

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

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

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

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

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

Object#yield_self -> Enumerator (9028.0)

self を引数としてブロックを評価し、ブロックの結果を返します。

self を引数としてブロックを評価し、ブロックの結果を返します。

//emlist[例][ruby]{
3.next.then {|x| x**x }.to_s # => "256"
"my string".yield_self {|s| s.upcase } # => "MY STRING"
//}

値をメソッドチェインのパイプラインに次々と渡すのは良い使い方です。

//emlist[メソッドチェインのパイプライン][ruby]{
require 'open-uri'
require 'json'

construct_url(arguments).
...

Object#yield_self {|x| ... } -> object (9028.0)

self を引数としてブロックを評価し、ブロックの結果を返します。

self を引数としてブロックを評価し、ブロックの結果を返します。

//emlist[例][ruby]{
3.next.then {|x| x**x }.to_s # => "256"
"my string".yield_self {|s| s.upcase } # => "MY STRING"
//}

値をメソッドチェインのパイプラインに次々と渡すのは良い使い方です。

//emlist[メソッドチェインのパイプライン][ruby]{
require 'open-uri'
require 'json'

construct_url(arguments).
...

Prime::EratosthenesGenerator#next -> Integer (9004.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 (9004.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 (9004.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 (9004.0)

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

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

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

レルムを返します。

レルムを返します。

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

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

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

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

Prime#each(upper_bound = nil, generator = EratosthenesGenerator.new) -> Enumerator (304.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 (304.0)

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

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

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

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

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

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

Proc#===(*arg) -> () (76.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) -> () (76.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) -> () (76.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) -> () (76.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...

絞り込み条件を変える

Range#===(obj) -> bool (58.0)

始端と終端の中に obj があるとき、true を返します。 そうでないとき、false を返します。

始端と終端の中に obj があるとき、true を返します。
そうでないとき、false を返します。

Range#=== は主に case 式での比較に用いられます。

//emlist[例][ruby]{
p (0...50) === 79 #=> false
p (60...80) === 79 #=> true

case 79
when 0...60 then puts "low"
when 60...80 then puts "medium" # => medium
when 80..100 then puts "high"
end
//}

2.5 以前は、単...

Kernel#check_signedness(type, headers = nil, opts = nil) -> "signed" | "unsigned" | nil (52.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 (52.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#convertible_int(type, headers = nil, opts = nil) (52.0)

Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG

Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.

If the +type+ is a integer type and _convertible_ type is found,
following macros are p...

Kernel#convertible_int(type, headers = nil, opts = nil) { ... } (52.0)

Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG

Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.

If the +type+ is a integer type and _convertible_ type is found,
following macros are p...

絞り込み条件を変える

RDoc::Context#find_symbol(symbol, method=nil) (52.0)

Look up the given symbol. If method is non-nil, then we assume the symbol references a module that contains that method

Look up the given symbol. If method is non-nil, then we assume
the symbol references a module that contains that method

Gem::DependencyList#dependency_order -> [Gem::Specification] (40.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 (40.0)

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

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

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

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

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

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

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

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

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

例:

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

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

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

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

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

例:

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

絞り込み条件を変える