るりまサーチ

最速Rubyリファレンスマニュアル検索!
2291件ヒット [1-100件を表示] (0.125秒)
トップページ > クエリ:t[x] > クエリ:with[x]

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. matrix t
  4. t61string new
  5. fiddle type_size_t

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

test/unit (26018.0)

ユニットテストを行うためのライブラリです。

...参照してください。

* Test::Unit - Ruby用単体テストフレームワーク: https://test-unit.github.io/

なお、2.2.0より前のtest/unit は当時バンドルしていた minitest/unit を使って再実装し
ていましたが、上記のtest/unitと完全な互換性がある...
...ィングフレームワークの歴史(2014年版) https://www.clear-code.com/blog/2014/11/6.html
* RubyKaigi 2015:The history of testing framework in Ruby https://www.clear-code.com/blog/2015/12/12.html

=== 使い方

T
est::Unit は以下のように使います。

まずテスト対象...
...PATTERN Filter test names on pattern.
--jobs-status [TYPE] Show status of jobs every file; Disabled when --jobs isn't specified.
-j, --jobs N Allow run tests with N jobs at once
--no-retry Don't retry running testc...

Data#with(**kwargs) -> Data (24213.0)

self をコピーしたオブジェクトを返します。

...gumentError 存在しないメンバを指定した場合に発生します。

//emlist[例][ruby]{
Dog = Data.define(:name, :age)
dog1 = Dog.new("Fred", 5) # => #<data Dog name="Fred", age=5>
dog2 = dog1.with(age: 6) # => #<data Dog name="Fred", age=6>
p dog1 # => #<data Dog...
...="Fred", age=5>
dog3 = dog1.with(type: "Terrier") # => ArgumentError (unknown keyword: :type)

# メンバのオブジェクトはコピーされず、同じオブジェクトを参照する。
dog1.name.upcase!
p dog1 # => #<data Dog name="FRED", age=5>
p dog2 # => #<data Dog name="FRED", age=6>
/...
.../}

[注意] 本メソッドの記述は Data のサブクラスのインスタンスに対して呼び
出す事を想定しています。Data.define は Data のサブクラスを作成する点に
注意してください。...

st_table * st_init_table_with_size(struct st_hash_type *type, int size) (18516.0)

st_table を作成する。_with_size はサイズを指定して生成する。 struct st_hash_type はハッシュ値を得る関数と、同値判定を行う 関数を持つ。

...st_table を作成する。_with_size はサイズを指定して生成する。
struct st_hash_type はハッシュ値を得る関数と、同値判定を行う
関数を持つ。...

st_table * st_init_numtable_with_size(int size) (18400.0)

キーが int 型であるハッシュテーブルを作成する。 st_init_table() に int 用の操作関数を渡しているだけ。

...キーが int 型であるハッシュテーブルを作成する。
st_init_table() に int 用の操作関数を渡しているだけ。...

st_table * st_init_strtable_with_size(int size) (18400.0)

キーが char* 型であるハッシュテーブルを作成する。 st_init_table に文字列用の操作関数を渡しているだけ。

...キーが char* 型であるハッシュテーブルを作成する。
st_init_table に文字列用の操作関数を渡しているだけ。...

絞り込み条件を変える

IRB::Inspector.keys_with_inspector(inspector) -> Array (15207.0)

引数で指定した IRB::Inspector に対応する key の配列を返します。

...引数で指定した IRB::Inspector に対応する key の配列を返します。

@param inspector IRB::Inspector オブジェクトを指定します。

IRB::Inspector.keys_with_inspector(IRB::Inspector::INSPECTORS[true])
# => [true, :p, "p", :inspect, "inspect"]...

Symbol#start_with?(*prefixes) -> bool (12243.0)

self の先頭が prefixes のいずれかであるとき true を返します。

...とき true を返します。

(self.to_s.start_with?と同じです。)

@param prefixes パターンを表す文字列または正規表現 (のリスト)

@see Symbol#end_with?

@see String#start_with?

//emlist[][ruby]{
:hello.start_with?("hell") #=> true
:hello.start_with?(/H/i)...
...#=> true

# returns true if one of the prefixes matches.
:hello.start_with?("heaven", "hell") #=> true
:hello.start_with?("heaven", "paradise") #=> false
//}...

String#start_with?(*prefixes) -> bool (12237.0)

self の先頭が prefixes のいずれかであるとき true を返します。

... true を返します。

@param prefixes パターンを表す文字列または正規表現 (のリスト)

//emlist[例][ruby]{
"string".start_with?("str") # => true
"string".start_with?("ing") # => false
"string".start_with?("ing", "str") # => true
"string".start_with?(/\w...
.../) # => true
"string".start_with?(/\d/) # => false
//}

@see String#end_with?
@see String#delete_prefix, String#delete_prefix!...

Symbol#end_with?(*suffixes) -> bool (12237.0)

self の末尾が suffixes のいずれかであるとき true を返します。

...とき true を返します。

(self.to_s.end_with?と同じです。)

@param suffixes パターンを表す文字列 (のリスト)

@see Symbol#start_with?

@see String#end_with?

//emlist[][ruby]{
:hello.end_with?("ello") #=> true

# returns true if one of the +suffixes+ matches....
...:hello.end_with?("heaven", "ello") #=> true
:hello.end_with?("heaven", "paradise") #=> false
//}...

Enumerable#each_with_index(*args) -> Enumerator (12232.0)

要素とそのインデックスをブロックに渡して繰り返します。

...ックを省略した場合は、
要素とそのインデックスを繰り返すような
Enumerator を返します。

Enumerator#with_index は offset 引数を受け取りますが、
each_with_index は受け取りません (引数はイテレータメソッドにそのまま渡されます)...
...ど) にそのまま渡されます。

//emlist[例][ruby]{
[5, 10, 15].each_with_index do |n, idx|
p [n, idx]
end
# => [5, 0]
# [10, 1]
# [15, 2]
//}

//emlist[引数ありの例][ruby]{
require 'stringio'
StringIO.new("foo|bar|baz").each_with_index("|") do |s, i|
p [s, i]
end
# => ["foo...
...|", 0]
# ["bar|", 1]
# ["baz", 2]
//}

@see Enumerator#with_index...

絞り込み条件を変える

Enumerable#each_with_index(*args) {|item, index| ... } -> self (12232.0)

要素とそのインデックスをブロックに渡して繰り返します。

...ックを省略した場合は、
要素とそのインデックスを繰り返すような
Enumerator を返します。

Enumerator#with_index は offset 引数を受け取りますが、
each_with_index は受け取りません (引数はイテレータメソッドにそのまま渡されます)...
...ど) にそのまま渡されます。

//emlist[例][ruby]{
[5, 10, 15].each_with_index do |n, idx|
p [n, idx]
end
# => [5, 0]
# [10, 1]
# [15, 2]
//}

//emlist[引数ありの例][ruby]{
require 'stringio'
StringIO.new("foo|bar|baz").each_with_index("|") do |s, i|
p [s, i]
end
# => ["foo...
...|", 0]
# ["bar|", 1]
# ["baz", 2]
//}

@see Enumerator#with_index...

Enumerator#with_index(offset = 0) -> Enumerator (12226.0)

生成時のパラメータに従って、要素にインデックスを添えて繰り返します。 インデックスは offset から始まります。

...デックスは offset から始まります。

ブロックを指定した場合の戻り値は生成時に指定したレシーバ自身です。

//emlist[例][ruby]{
str = "xyz"

enum = Enumerator.new {|y| str.each_byte {|b| y << b }}
enum.with_index {|byte, idx| p [byte, idx] }
# => [120,...
...0]
# [121, 1]
# [122, 2]

require "stringio"
StringIO.new("foo|bar|baz").each("|").with_index(1) {|s, i| p [s, i] }
# => ["foo|", 1]
# ["bar|", 2]
# ["baz", 3]
//}


生成時のパラメータに従って、要素にインデックスを添えてブロックを繰り...
...返します。
インデックスは 0 から始まります。
Enumerator#with_index は offset 引数を受け取りますが、
each_with_index は受け取りません (引数はイテレータメソッドにそのまま渡されます)。...
<< 1 2 3 ... > >>