359件ヒット
[1-100件を表示]
(0.124秒)
ライブラリ
クラス
- Array (55)
- CSV (22)
- ERB (18)
-
Gem
:: DependencyList (11) - Object (33)
-
OpenSSL
:: SSL :: SSLSocket (11) - StopIteration (11)
- String (99)
-
WIN32OLE
_ PARAM (11)
モジュール
- Enumerable (66)
- FileUtils (22)
キーワード
- === (11)
- [] (33)
-
_ dump (11) - combination (11)
-
force
_ quotes? (11) - inject (33)
-
marshal
_ dump (11) - output? (11)
- permutation (22)
- reduce (33)
-
repeated
_ combination (11) -
repeated
_ permutation (11) -
result
_ with _ hash (7) - ruby (11)
- sh (11)
- slice (66)
-
spec
_ predecessors (11) -
verify
_ result (11) -
write
_ headers? (11)
検索結果
先頭5件
-
ERB
# result(b=TOPLEVEL _ BINDING) -> String (24214.0) -
ERB を b の binding で実行し、結果の文字列を返します。
...を b の binding で実行し、結果の文字列を返します。
@param b eRubyスクリプトが実行されるときのbinding
//emlist[例][ruby]{
require 'erb'
erb = ERB.new("test <%= test1 %>\ntest <%= test2 %>\n")
test1 = "foo"
test2 = "bar"
puts erb.result
# test foo
# test bar
//}......し、結果の文字列を返します。
@param b eRubyスクリプトが実行されるときのbinding
//emlist[例][ruby]{
require 'erb'
erb = ERB.new("test <%= test1 %>\ntest <%= test2 %>\n")
test1 = "foo"
test2 = "bar"
puts erb.result
# test foo
# test bar
//}
@see ERB#result_with_hash... -
StopIteration
# result -> object (24208.0) -
この例外オブジェクトを発生させる原因となったメソッド等の返り値を返します。
...ect = Object.new
def object.each
yield :yield1
yield :yield2
:each_returned
end
enumerator = object.to_enum
p enumerator.next #=> :yield1
p enumerator.next #=> :yield2
begin
enumerator.next
rescue StopIteration => error
p error.result #=> :each_returned
end... -
OpenSSL
:: SSL :: SSLSocket # verify _ result -> Integer (15202.0) -
検証結果のエラーコードを整数値で返します。
...検証結果のエラーコードを整数値で返します。
エラーコードの整数値は OpenSSL::X509 に定数が定義されています。
詳しくは c:OpenSSL::X509#verify_error を見てください。
検証に成功した場合は OpenSSL::X509::V_OK を返します。... -
ERB
# result _ with _ hash(hash) -> String (12208.0) -
ERB をハッシュオブジェクトで指定されたローカル変数を持つ 新しいトップレベルバインディングで実行し、結果の文字列を返します。
...ERB をハッシュオブジェクトで指定されたローカル変数を持つ
新しいトップレベルバインディングで実行し、結果の文字列を返します。
@param hash ローカル変数名をキーにしたハッシュ
@see ERB#result... -
Object
# marshal _ dump -> object (6113.0) -
Marshal.#dump を制御するメソッドです。
...Marshal.#dump を制御するメソッドです。
Marshal.dump(some) において、出力するオブジェクト some がメソッド marshal_dump を
持つ場合には、その返り値がダンプされたものが Marshal.dump(some) の返り値となります。
marshal_dump/marshal_load......は _dump/_load ではなく
marshal_dump/marshal_load を使うべきです。
@return 任意のオブジェクトで marshal_load の引数に利用できます。
//emlist[][ruby]{
class Foo
def initialize(arg)
@foo = arg
end
def marshal_dump
@foo
end
def marshal_load(obj)......#=> #<Foo:0xbaf3b0 @foo=["foo", "bar"]>
dms = Marshal.dump(foo)
p dms #=> "\004\bU:\bFoo[\a\"\bfoo\"\bbar"
result = Marshal.load(dms) #=> ["foo", "bar"] # marshal_load の引数
p result #=> #<Foo:0xbaf2ac @foo=["foo", "bar"]>
//}
イン... -
Enumerable
# inject(init = self . first) {|result , item| . . . } -> object (3251.0) -
リストのたたみこみ演算を行います。
...トのたたみこみ演算を行います。
最初に初期値 init と self の最初の要素を引数にブロックを実行します。
2 回目以降のループでは、前のブロックの実行結果と
self の次の要素を引数に順次ブロックを実行します。
そうして......素がなければブロックを実行せずに nil を返します。
@param init 最初の result の値です。任意のオブジェクトが渡せます。
@param sym ブロックの代わりに使われるメソッド名を表す Symbol オブジェクトを指定します。......ッドが呼ばれます。
//emlist[例][ruby]{
# 合計を計算する。
p [2, 3, 4, 5].inject {|result, item| result + item } #=> 14
# 自乗和を計算する。初期値をセットする必要がある。
p [2, 3, 4, 5].inject(0) {|result, item| result + item**2 } #=> 54
//}
この... -
Enumerable
# reduce(init = self . first) {|result , item| . . . } -> object (3251.0) -
リストのたたみこみ演算を行います。
...トのたたみこみ演算を行います。
最初に初期値 init と self の最初の要素を引数にブロックを実行します。
2 回目以降のループでは、前のブロックの実行結果と
self の次の要素を引数に順次ブロックを実行します。
そうして......素がなければブロックを実行せずに nil を返します。
@param init 最初の result の値です。任意のオブジェクトが渡せます。
@param sym ブロックの代わりに使われるメソッド名を表す Symbol オブジェクトを指定します。......ッドが呼ばれます。
//emlist[例][ruby]{
# 合計を計算する。
p [2, 3, 4, 5].inject {|result, item| result + item } #=> 14
# 自乗和を計算する。初期値をセットする必要がある。
p [2, 3, 4, 5].inject(0) {|result, item| result + item**2 } #=> 54
//}
この... -
FileUtils
# ruby(*args) {|result , status| . . . } (3202.0) -
与えられた引数で Ruby インタプリタを実行します。
...与えられた引数で Ruby インタプリタを実行します。
@param args Ruby インタプリタに与える引数を指定します。
例:
ruby %{-pe '$_.upcase!' <README}
@see Kernel.#sh... -
FileUtils
# sh(*cmd) {|result , status| . . . } (3202.0) -
与えられたコマンドを実行します。
...l.#exec を参照してください。
例:
sh %{ls -ltr}
sh 'ls', 'file with spaces'
# check exit status after command runs
sh %{grep pattern file} do |ok, res|
if ! ok
puts "pattern not found (status = #{res.exitstatus})"
end
end
@see Kernel.#exec, Kernel... -
String
# slice(substr) -> String | nil (3119.0) -
self が substr を含む場合、一致した文字列を新しく作って返します。 substr を含まなければ nil を返します。
...self が substr を含む場合、一致した文字列を新しく作って返します。
substr を含まなければ nil を返します。
@param substr 取得したい文字列のパターン。文字列
//emlist[例][ruby]{
substr = "bar"
result = "foobar"[substr]
p result # => "bar"......p substr.equal?(result) # => false
//}...