ライブラリ
- ビルトイン (74)
-
cgi
/ html (22) - mkmf (44)
-
net
/ imap (11) -
net
/ smtp (11) - prime (55)
- rake (11)
-
rdoc
/ context (11) -
rubygems
/ dependency _ list (11) -
webrick
/ httpauth / authenticator (33) -
webrick
/ httpauth / basicauth (11) -
webrick
/ httpauth / digestauth (11)
クラス
-
Gem
:: DependencyList (11) -
Net
:: IMAP (11) -
Net
:: SMTP (11) - Object (24)
- Prime (22)
-
Prime
:: EratosthenesGenerator (33) - Proc (44)
-
RDoc
:: Context (11) -
Rake
:: FileList (11) - Range (6)
-
WEBrick
:: HTTPAuth :: BasicAuth (11) -
WEBrick
:: HTTPAuth :: DigestAuth (11)
モジュール
-
CGI
:: HtmlExtension (22) - Kernel (44)
-
WEBrick
:: HTTPAuth :: Authenticator (33)
キーワード
- === (17)
- [] (11)
- authenticate (44)
- call (11)
-
check
_ signedness (22) -
convertible
_ int (22) -
dependency
_ order (11) - each (22)
- exclude (11)
-
find
_ symbol (11) - html (22)
- logger (11)
- next (11)
- realm (11)
- rewind (11)
- succ (11)
- userdb (11)
- yield (11)
-
yield
_ self (12)
検索結果
先頭5件
-
Object
# then -> Enumerator (24209.0) -
self を引数としてブロックを評価し、ブロックの結果を返します。
...]{
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).
yield_self {|url| URI(url).read }.
yield_self {|response| JSON.parse(response) }
//}
ブロックなしで呼び出されたときは Enumerator を返します。
例えば条件によって値を捨てるのに使えます。
//emlist[][ruby]{
# 条......件にあうので何もしない
1.yield_self.detect(&:odd?) # => 1
# 条件に合わないので値を捨てる
2.yield_self.detect(&:odd?) # => nil
//}
@see Object#tap... -
Object
# then {|x| . . . } -> object (24209.0) -
self を引数としてブロックを評価し、ブロックの結果を返します。
...]{
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).
yield_self {|url| URI(url).read }.
yield_self {|response| JSON.parse(response) }
//}
ブロックなしで呼び出されたときは Enumerator を返します。
例えば条件によって値を捨てるのに使えます。
//emlist[][ruby]{
# 条......件にあうので何もしない
1.yield_self.detect(&:odd?) # => 1
# 条件に合わないので値を捨てる
2.yield_self.detect(&:odd?) # => nil
//}
@see Object#tap... -
Kernel
# check _ signedness(type , headers = nil , opts = nil) -> "signed" | "unsigned" | nil (15417.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_O......F_', 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 preprocesso......r macro would be passed to the
compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is
done.... -
Kernel
# check _ signedness(type , headers = nil , opts = nil) { . . . } -> "signed" | "unsigned" | nil (15417.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_O......F_', 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 preprocesso......r macro would be passed to the
compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is
done.... -
Prime
:: EratosthenesGenerator # next -> Integer (15101.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
//}... -
Net
:: IMAP # authenticate(auth _ type , user , password) -> Net :: IMAP :: TaggedResponse (12201.0) -
AUTHENTICATE コマンドを送り、クライアントを認証します。
...AUTHENTICATE コマンドを送り、クライアントを認証します。
auth_type で利用する認証方式を文字列で指定します。
例:
imap.authenticate('LOGIN', user, password)
auth_type としては以下がサポートされています。
* "LOGIN"
* "PLAIN"
* "CRA......M-MD5"
* "DIGEST-MD5"
@param auth_type 認証方式を表す文字列
@param user ユーザ名文字列
@param password パスワード文字列
@see Net::IMAP#login... -
Net
:: SMTP # authenticate(user , secret , authtype) -> () (12201.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::SMTP#auth_login, Net::SMTP#auth_cram_md5... -
WEBrick
:: HTTPAuth :: BasicAuth # authenticate(request , response) -> bool (12201.0) -
クライアントから送られてきたユーザ名とパスワードを認証します。 認証に失敗した場合は challenge を呼びます。
...。
認証に失敗した場合は challenge を呼びます。
@param request WEBrick::HTTPRequest のインスタンスを指定します。
@param response WEBrick::HTTPResponse のインスタンスを指定します。
@raise WEBrick::HTTPStatus::Unauthorized 認証に失敗した場合に... -
WEBrick
:: HTTPAuth :: DigestAuth # authenticate(request , response) -> true (12201.0) -
クライアントから送られてきたユーザ名とパスワードを認証します。 認証に失敗した場合は challenge を呼びます。
...。
認証に失敗した場合は challenge を呼びます。
@param request WEBrick::HTTPRequest のインスタンスを指定します。
@param response WEBrick::HTTPResponse のインスタンスを指定します。
@raise WEBrick::HTTPStatus::Unauthorized 認証に失敗した場合に... -
Prime
:: EratosthenesGenerator # rewind -> nil (12101.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
//}...