253件ヒット
[1-100件を表示]
(0.088秒)
別のキーワード
ライブラリ
- ビルトイン (139)
-
minitest
/ unit (6) -
net
/ ftp (12) -
net
/ http (24) -
net
/ pop (36) - rake (12)
- resolv (12)
-
rubygems
/ user _ interaction (12)
クラス
- Array (36)
- BasicObject (12)
-
Gem
:: StreamUI :: VerboseProgressReporter (12) -
MiniTest
:: Unit (5) -
Net
:: FTP (12) -
Net
:: POP3 (36) - Proc (7)
-
Rake
:: FileList (12) -
Resolv
:: DNS (12) - String (12)
- Thread (24)
モジュール
- Enumerable (36)
- GC (12)
-
MiniTest
:: Assertions (1) -
Net
:: HTTPHeader (24)
キーワード
- != (12)
- << (7)
-
_ assertions= (1) - acct (12)
-
assertion
_ count= (1) -
auth
_ only (12) -
basic
_ auth (12) - egrep (12)
- errors= (1)
- failures= (1)
-
garbage
_ collect (12) - priority (12)
- priority= (12)
-
proxy
_ basic _ auth (12) - skips= (1)
- start (24)
-
test
_ count= (1) - timeouts= (12)
- updated (12)
検索結果
先頭5件
-
String
# count(*chars) -> Integer (18138.0) -
chars で指定された文字が文字列 self にいくつあるか数えます。
...。
@param chars 出現回数を数える文字のパターン
//emlist[例][ruby]{
p 'abcdefg'.count('c') # => 1
p '123456789'.count('2378') # => 4
p '123456789'.count('2-8', '^4-6') # => 4
# ファイルの行数を数える
n_lines = File.read("foo").count("\n")
#......ファイルの末尾に改行コードがない場合にも対処する
buf = File.read("foo")
n_lines = buf.count("\n")
n_lines += 1 if /[^\n]\z/ =~ buf
# if /\n\z/ !~ buf だと空ファイルを 1 行として数えてしまうのでダメ
//}... -
Array
# count -> Integer (18134.0) -
レシーバの要素数を返します。
...ブロックを評価して真になった要素の個数を
カウントして返します。
@param item カウント対象となる値。
//emlist[例][ruby]{
ary = [1, 2, 4, 2.0]
ary.count # => 4
ary.count(2) # => 2
ary.count{|x|x%2==0} # => 3
//}
@see Enumerable#count... -
Array
# count {|obj| . . . } -> Integer (18134.0) -
レシーバの要素数を返します。
...ブロックを評価して真になった要素の個数を
カウントして返します。
@param item カウント対象となる値。
//emlist[例][ruby]{
ary = [1, 2, 4, 2.0]
ary.count # => 4
ary.count(2) # => 2
ary.count{|x|x%2==0} # => 3
//}
@see Enumerable#count... -
Array
# count(item) -> Integer (18134.0) -
レシーバの要素数を返します。
...ブロックを評価して真になった要素の個数を
カウントして返します。
@param item カウント対象となる値。
//emlist[例][ruby]{
ary = [1, 2, 4, 2.0]
ary.count # => 4
ary.count(2) # => 2
ary.count{|x|x%2==0} # => 3
//}
@see Enumerable#count... -
Enumerable
# count -> Integer (18134.0) -
レシーバの要素数を返します。
...価して真になった要素の個数を
カウントして返します。
@param item カウント対象となる値。
//emlist[例][ruby]{
enum = [1, 2, 4, 2].each
enum.count # => 4
enum.count(2) # => 2
enum.count{|x|x%2==0} # => 3
//}
@see Array#count... -
Enumerable
# count {|obj| . . . } -> Integer (18134.0) -
レシーバの要素数を返します。
...価して真になった要素の個数を
カウントして返します。
@param item カウント対象となる値。
//emlist[例][ruby]{
enum = [1, 2, 4, 2].each
enum.count # => 4
enum.count(2) # => 2
enum.count{|x|x%2==0} # => 3
//}
@see Array#count... -
Enumerable
# count(item) -> Integer (18134.0) -
レシーバの要素数を返します。
...価して真になった要素の個数を
カウントして返します。
@param item カウント対象となる値。
//emlist[例][ruby]{
enum = [1, 2, 4, 2].each
enum.count # => 4
enum.count(2) # => 2
enum.count{|x|x%2==0} # => 3
//}
@see Array#count... -
MiniTest
:: Unit # assertion _ count=(count) (6215.0) -
アサーション数をセットします。
...アサーション数をセットします。
@param count 件数を指定します。... -
MiniTest
:: Unit # test _ count=(count) (6215.0) -
テストケース数をセットします。
...テストケース数をセットします。
@param count 件数を指定します。... -
Rake
:: FileList # egrep(pattern) {|filename , count , line| . . . } (168.0) -
与えられたパターンをファイルリストから grep のように検索します。
...ます。ブロックが与えられなかった場合は、
標準出力に、ファイル名:行番号:マッチした行を出力します。
@param pattern 正規表現を指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
IO.write("sample1", "line1\nline2\nline3\n")
IO.w......|filename, count, line|
"filename = #{filename}, count = #{count}, line = #{line}"
end
end
# => "filename = sample1, count = 1, line = line1\n"
# => "filename = sample1, count = 2, line = line2\n"
# => "filename = sample1, count = 3, line = line3\n"
# => "filename = sample2, count = 1, line......= line1\n"
# => "filename = sample2, count = 2, line = line2\n"
# => "filename = sample2, count = 3, line = line3\n"
# => "filename = sample2, count = 4, line = line4\n"
//}... -
MiniTest
:: Assertions # _ assertions=(count) (114.0) -
アサーション数をセットします。
...アサーション数をセットします。
@param count 件数を指定します。... -
MiniTest
:: Unit # errors=(count) (114.0) -
エラー数をセットします。
...エラー数をセットします。
@param count 件数を指定します。...