309件ヒット
[1-100件を表示]
(0.142秒)
クラス
- BasicObject (11)
- Method (11)
-
Net
:: POP3 (22) -
Scanf
:: FormatString (12) - String (11)
- Thread (22)
- UnboundMethod (33)
モジュール
- Etc (11)
- GC (11)
-
Net
:: HTTPHeader (22) - ObjectSpace (55)
キーワード
- != (11)
- ConditionVariable (11)
-
NEWS for Ruby 2
. 1 . 0 (11) -
SC
_ 2 _ PBS _ ACCOUNTING (11) - arity (22)
-
auth
_ only (11) -
basic
_ auth (11) -
count
_ nodes (11) -
count
_ objects _ size (11) -
count
_ tdata _ objects (11) -
each
_ object (22) - foreach (11)
- inspect (11)
-
matched
_ count (6) - priority (11)
- priority= (11)
-
proxy
_ basic _ auth (11) - prune (6)
-
ruby 1
. 6 feature (11) -
rubygems
/ commands / install _ command (11) -
rubygems
/ commands / list _ command (11) -
rubygems
/ commands / query _ command (11) -
rubygems
/ commands / search _ command (11) -
rubygems
/ commands / specification _ command (11) - stat (11)
-
to
_ s (11)
検索結果
先頭5件
-
String
# count(*chars) -> Integer (21331.0) -
chars で指定された文字が文字列 self にいくつあるか数えます。
...chars で指定された文字が文字列 self にいくつあるか数えます。
検索する文字を示す引数 chars の形式は tr(1) と同じです。
つまり、「"a-c"」は文字 a から c を意味し、
「"^0-9"」のように文字列の先頭が「^」の場合は
指定文......@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
:: FormatString # matched _ count (15201.0) -
@todo
@todo -
ObjectSpace
. # count _ objects _ size(result _ hash = nil) -> Hash (12407.0) -
型ごとのオブジェクトサイズをバイト単位で格納したハッシュを返します。
...イト単位で格納したハッシュを返します。
@param result_hash 戻り値のためのハッシュを指定します。省略した場合は新
しくハッシュを作成します。result_hash の内容は上書き
されます。プローブ効......。特に T_DATA の合計値は正しくないでしょう。
//emlist[例][ruby]{
ObjectSpace.count_objects_size
# => {:TOTAL=>1461154, :T_CLASS=>158280, :T_MODULE=>20672, :T_STRING=>527249, ...}
//}
@raise TypeError result_hash にハッシュ以外を指定した時に発生します。
戻... -
Net
:: HTTPHeader # basic _ auth(account , password) -> [String] (12300.0) -
Authorization: ヘッダを BASIC 認証用にセットします。
...thorization: ヘッダを BASIC 認証用にセットします。
@param account アカウント名を文字列で与えます。
@param password パスワードを文字列で与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::H......TTP::Get.new(uri.request_uri)
req.basic_auth("user", "pass") # => ["Basic dXNlcjpwYXNz"]
//}... -
Net
:: HTTPHeader # proxy _ basic _ auth(account , password) -> [String] (12300.0) -
Proxy 認証のために Proxy-Authorization: ヘッダをセットします。
...uthorization: ヘッダをセットします。
@param account アカウント名を文字列で与えます。
@param password パスワードを文字列で与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.r......equest_uri)
req.proxy_basic_auth("account", "password") # => ["Basic YWNjb3VudDpwYXNzd29yZA=="]
//}... -
Etc
:: SC _ 2 _ PBS _ ACCOUNTING -> Integer (9301.0) -
Etc.#sysconf の引数に指定します。
Etc.#sysconf の引数に指定します。
詳細は sysconf(3) を参照してください。 -
UnboundMethod
# inspect -> String (9212.0) -
self を読みやすい文字列として返します。
...self を読みやすい文字列として返します。
詳しくは Method#inspect を参照してください。
//emlist[例][ruby]{
String.instance_method(:count).inspect # => "#<UnboundMethod: String#count>"
//}
@see Method#inspect... -
Thread
# priority -> Integer (9148.0) -
スレッドの優先度を返します。この値が大きいほど優先度が高くなります。 メインスレッドのデフォルト値は 0 です。新しく生成されたスレッドは親スレッドの priority を引き継ぎます。
...の
priority を引き継ぎます。
@param val スレッドの優先度を指定します。プラットフォームに依存します。
//emlist[例][ruby]{
Thread.current.priority # => 0
count1 = count2 = 0
a = Thread.new do
loop { count1 += 1 }
end
a.priority = -1
b = Thread.ne......w do
loop { count2 += 1 }
end
b.priority = -2
count1 = count2 = 0 # reset
sleep 1 # => 1
count1 # => 13809431
count2 # => 11571921
//}... -
Thread
# priority=(val) (9148.0) -
スレッドの優先度を返します。この値が大きいほど優先度が高くなります。 メインスレッドのデフォルト値は 0 です。新しく生成されたスレッドは親スレッドの priority を引き継ぎます。
...の
priority を引き継ぎます。
@param val スレッドの優先度を指定します。プラットフォームに依存します。
//emlist[例][ruby]{
Thread.current.priority # => 0
count1 = count2 = 0
a = Thread.new do
loop { count1 += 1 }
end
a.priority = -1
b = Thread.ne......w do
loop { count2 += 1 }
end
b.priority = -2
count1 = count2 = 0 # reset
sleep 1 # => 1
count1 # => 13809431
count2 # => 11571921
//}... -
Method
# arity -> Integer (9106.0) -
メソッドが受け付ける引数の数を返します。
...。
//emlist[例][ruby]{
class C
def u; end
def v(a); end
def w(*a); end
def x(a, b); end
def y(a, b, *c); end
def z(a, b, *c, &d); end
end
c = C.new
p c.method(:u).arity #=> 0
p c.method(:v).arity #=> 1
p c.method(:w).arity #=......> -1
p c.method(:x).arity #=> 2
p c.method(:y).arity #=> -3
p c.method(:z).arity #=> -3
s = "xyz"
s.method(:size).arity #=> 0
s.method(:replace).arity #=> 1
s.method(:squeeze).arity #=> -1
s.method(:count).arity #=> -1
//}...