80件ヒット
[1-80件を表示]
(0.149秒)
クラス
- IO (33)
- Object (14)
-
OpenSSL
:: BN (33)
キーワード
-
mod
_ exp (11) -
mod
_ sqr (11) -
set
_ encoding (33) -
yield
_ self (14)
検索結果
先頭5件
-
OpenSSL
:: BN # **(other) -> OpenSSL :: BN (24301.0) -
自身の other 乗を返します。
...自身の other 乗を返します。
@param other 指数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#mod_exp... -
OpenSSL
:: BN # mod _ exp(other , m) -> OpenSSL :: BN (6217.0) -
(self ** other) % m を返します。
...(self ** other) % m を返します。
//emlist[][ruby]{
require 'openssl'
OpenSSL::BN.new("7").mod_exp(OpenSSL::BN.new("3"), OpenSSL::BN.new("6")) # => 1
//}
@param other 指数
@param m 剰余を取る数
@raise OpenSSL::BNError 計算時エラー... -
OpenSSL
:: BN # mod _ sqr(m) -> OpenSSL :: BN (6217.0) -
(self ** 2) % m を返します。
...(self ** 2) % m を返します。
@param m mod を取る数
@raise OpenSSL::BNError 計算時エラー
@see OpenSSL::BN#sqr... -
Object
# yield _ self -> Enumerator (6113.0) -
self を引数としてブロックを評価し、ブロックの結果を返します。
...self を引数としてブロックを評価し、ブロックの結果を返します。
//emlist[例][ruby]{
"my string".yield_self {|s| s.upcase } # => "MY STRING"
3.next.yield_self {|x| x**x }.to_s # => "256"
//}
値をメソッドチェインのパイプラインに次々と渡すの......は良い使い方です。
//emlist[メソッドチェインのパイプライン][ruby]{
require 'open-uri'
require 'json'
construct_url(arguments).
yield_self {|url| URI(url).read }.
yield_self {|response| JSON.parse(response) }
//}
ブロックなしで呼び出されたときは Enumerat......返します。
例えば条件によって値を捨てるのに使えます。
//emlist[][ruby]{
# 条件にあうので何もしない
1.yield_self.detect(&:odd?) # => 1
# 条件に合わないので値を捨てる
2.yield_self.detect(&:odd?) # => nil
//}
@see Object#tap... -
Object
# yield _ self {|x| . . . } -> object (6113.0) -
self を引数としてブロックを評価し、ブロックの結果を返します。
...self を引数としてブロックを評価し、ブロックの結果を返します。
//emlist[例][ruby]{
"my string".yield_self {|s| s.upcase } # => "MY STRING"
3.next.yield_self {|x| x**x }.to_s # => "256"
//}
値をメソッドチェインのパイプラインに次々と渡すの......は良い使い方です。
//emlist[メソッドチェインのパイプライン][ruby]{
require 'open-uri'
require 'json'
construct_url(arguments).
yield_self {|url| URI(url).read }.
yield_self {|response| JSON.parse(response) }
//}
ブロックなしで呼び出されたときは Enumerat......返します。
例えば条件によって値を捨てるのに使えます。
//emlist[][ruby]{
# 条件にあうので何もしない
1.yield_self.detect(&:odd?) # => 1
# 条件に合わないので値を捨てる
2.yield_self.detect(&:odd?) # => nil
//}
@see Object#tap... -
Object
# yield _ self -> Enumerator (3113.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).
yield_self {|url| URI(url).read }.
yield_self {|response| JSON.parse(response) }
//}
ブロックなしで呼び出されたときは Enumerat......返します。
例えば条件によって値を捨てるのに使えます。
//emlist[][ruby]{
# 条件にあうので何もしない
1.yield_self.detect(&:odd?) # => 1
# 条件に合わないので値を捨てる
2.yield_self.detect(&:odd?) # => nil
//}
@see Object#tap... -
Object
# yield _ self {|x| . . . } -> object (3113.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).
yield_self {|url| URI(url).read }.
yield_self {|response| JSON.parse(response) }
//}
ブロックなしで呼び出されたときは Enumerat......返します。
例えば条件によって値を捨てるのに使えます。
//emlist[][ruby]{
# 条件にあうので何もしない
1.yield_self.detect(&:odd?) # => 1
# 条件に合わないので値を捨てる
2.yield_self.detect(&:odd?) # => nil
//}
@see Object#tap... -
IO
# set _ encoding(enc _ str , **opts) -> self (209.0) -
IO のエンコーディングを設定します。
...oding オブジェクトを指定します。
@param int_enc 内部エンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param opts エンコーディング変換のオプション
例:
io = File.open(file)
io.set_encoding("ASCII-8BIT", "EUC-JP")......coding オブジェクトを指定します。
@param int_enc 内部エンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param opts エンコーディング変換のオプション
例:
io = File.open(file)
io.set_encoding("ASCII-8BIT", "EUC-JP")... -
IO
# set _ encoding(ext _ enc , int _ enc , **opts) -> self (209.0) -
IO のエンコーディングを設定します。
...oding オブジェクトを指定します。
@param int_enc 内部エンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param opts エンコーディング変換のオプション
例:
io = File.open(file)
io.set_encoding("ASCII-8BIT", "EUC-JP")......coding オブジェクトを指定します。
@param int_enc 内部エンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param opts エンコーディング変換のオプション
例:
io = File.open(file)
io.set_encoding("ASCII-8BIT", "EUC-JP")... -
IO
# set _ encoding(ext _ enc) -> self (109.0) -
IO のエンコーディングを設定します。
...oding オブジェクトを指定します。
@param int_enc 内部エンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param opts エンコーディング変換のオプション
例:
io = File.open(file)
io.set_encoding("ASCII-8BIT", "EUC-JP")......coding オブジェクトを指定します。
@param int_enc 内部エンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param opts エンコーディング変換のオプション
例:
io = File.open(file)
io.set_encoding("ASCII-8BIT", "EUC-JP")...