るりまサーチ

最速Rubyリファレンスマニュアル検索!
278件ヒット [1-100件を表示] (0.125秒)

別のキーワード

  1. openssl p
  2. openssl p=
  3. fileutils mkdir_p
  4. dsa p
  5. dsa p=

検索結果

<< 1 2 3 > >>

Gem::StreamUI::SilentProgressReporter#count -> nil (21102.0)

何もしません。

何もしません。

Gem::StreamUI::SimpleProgressReporter#count -> Integer (21102.0)

Gem::StreamUI::SimpleProgressReporter#updated が呼び出された回数を返します。

...Gem::StreamUI::SimpleProgressReporter#updated が呼び出された回数を返します。...

Gem::StreamUI::VerboseProgressReporter#count -> Integer (21102.0)

Gem::StreamUI::VerboseProgressReporter#updated が呼び出された回数を返します。

...Gem::StreamUI::VerboseProgressReporter#updated が呼び出された回数を返します。...

String#count(*chars) -> Integer (18150.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 行として数えてしまうのでダメ
//}...

Scanf::FormatSpecifier#count_space? (12202.0)

@todo

@todo

絞り込み条件を変える

Scanf::FormatString#spec_count (12202.0)

@todo

@todo

Rake::FileList#egrep(pattern) {|filename, count, line| ... } (6262.0)

与えられたパターンをファイルリストから grep のように検索します。

...与えられたパターンをファイルリストから grep のように検索します。

ブロックが与えられた場合は、マッチした行の情報 (ファイル名、行番号、マッチした行) が
ブロックに渡されてブロックが評価されます。ブロックが...
...

@param pattern 正規表現を指定します。

//emlist[][ruby]{
# Rakefile での記載例とする

IO.write("sample1", "line1\nline2\nline3\n")
IO.write("sample2", "line1\nline2\nline3\nline4\n")

task default: :test_rake_app
task :test_rake_app do

file_list = FileList.new('sample*')...
..._list.egrep(/line/) # => 7

file_list.egrep(/.*/) do |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...

MiniTest::Unit#skips=(count) (6208.0)

実行しなかったテストケース数をセットします。

...実行しなかったテストケース数をセットします。

@param count 件数を指定します。...

Scanf::FormatString#prune(n=matched_count) (6202.0)

@todo

@todo

Net::HTTPHeader#proxy_basic_auth(account, password) -> [String] (6201.0)

Proxy 認証のために Proxy-Authorization: ヘッダをセットします。

...
P
roxy 認証のために Proxy-Authorization: ヘッダをセットします。

@param account アカウント名を文字列で与えます。
@param password パスワードを文字列で与えます。

//emlist[例][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html...
...')
req = Net::HTTP::Get.new(uri.request_uri)
req.proxy_basic_auth("account", "password") # => ["Basic YWNjb3VudDpwYXNzd29yZA=="]
//}...

絞り込み条件を変える

Thread#priority -> Integer (6149.0)

スレッドの優先度を返します。この値が大きいほど優先度が高くなります。 メインスレッドのデフォルト値は 0 です。新しく生成されたスレッドは親スレッドの priority を引き継ぎます。

...スレッドの
p
riority を引き継ぎます。

@param val スレッドの優先度を指定します。プラットフォームに依存します。

//emlist[例][ruby]{
Thread.current.priority # => 0

count
1 = count2 = 0
a = Thread.new do
loop { count1 += 1 }
end
a.priority = -1

b...
...= Thread.new do
loop { count2 += 1 }
end
b.priority = -2
count
1 = count2 = 0 # reset
sleep 1 # => 1
count
1 # => 13809431
count
2 # => 11571921
//}...

Thread#priority=(val) (6149.0)

スレッドの優先度を返します。この値が大きいほど優先度が高くなります。 メインスレッドのデフォルト値は 0 です。新しく生成されたスレッドは親スレッドの priority を引き継ぎます。

...スレッドの
p
riority を引き継ぎます。

@param val スレッドの優先度を指定します。プラットフォームに依存します。

//emlist[例][ruby]{
Thread.current.priority # => 0

count
1 = count2 = 0
a = Thread.new do
loop { count1 += 1 }
end
a.priority = -1

b...
...= Thread.new do
loop { count2 += 1 }
end
b.priority = -2
count
1 = count2 = 0 # reset
sleep 1 # => 1
count
1 # => 13809431
count
2 # => 11571921
//}...
<< 1 2 3 > >>