170件ヒット
[1-100件を表示]
(0.050秒)
種類
- インスタンスメソッド (95)
- 文書 (31)
- ライブラリ (22)
- 定数 (11)
- モジュール関数 (11)
クラス
-
CSV
:: Table (11) -
Scanf
:: FormatString (18) - String (11)
- UnboundMethod (33)
モジュール
- Etc (11)
-
Net
:: HTTPHeader (22) - ObjectSpace (11)
キーワード
-
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 3 . 0 (9) -
SC
_ 2 _ PBS _ ACCOUNTING (11) - arity (11)
-
basic
_ auth (11) -
count
_ objects _ size (11) - inspect (22)
-
matched
_ count (6) -
proxy
_ basic _ auth (11) - prune (6)
-
ruby 1
. 6 feature (11) -
rubygems
/ commands / list _ command (11) -
rubygems
/ commands / search _ command (11) -
spec
_ count (6) -
to
_ s (11)
検索結果
先頭5件
-
String
# count(*chars) -> Integer (39131.0) -
chars で指定された文字が文字列 self にいくつあるか数えます。
...文字のパターン
//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 (9101.0) -
@todo
@todo -
Scanf
:: FormatString # spec _ count (9101.0) -
@todo
@todo -
ObjectSpace
. # count _ objects _ size(result _ hash = nil) -> Hash (6113.0) -
型ごとのオブジェクトサイズをバイト単位で格納したハッシュを返します。
...ります。特に T_DATA の合計値は正しくないでしょう。
//emlist[例][ruby]{
ObjectSpace.count_objects_size
# => {:TOTAL=>1461154, :T_CLASS=>158280, :T_MODULE=>20672, :T_STRING=>527249, ...}
//}
@raise TypeError result_hash にハッシュ以外を指定した時に発生します... -
Etc
:: SC _ 2 _ PBS _ ACCOUNTING -> Integer (3101.0) -
Etc.#sysconf の引数に指定します。
Etc.#sysconf の引数に指定します。
詳細は sysconf(3) を参照してください。 -
Scanf
:: FormatString # prune(n=matched _ count) (3101.0) -
@todo
@todo -
ruby 1
. 6 feature (312.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...りました。
p "#{ "" }"
=> ruby 1.6.7 (2002-03-01) [i586-linux]
""
=> -:1: warning: bad substitution in string
ruby 1.6.7 (2002-09-12) [i586-linux]
"#{ }"
=> ruby 1.6.7 (2002-09-25) [i586-linux]
""
これは1.7......ません。1.6に入るかも不明です。-))
: 2002-07-11 String#slice!
範囲外の文字列を指定したときに例外を返す場合がありましたが、常に nil
を返すようになりました。(String#[]やString#slice と同じ結果を返すと
いうことです)......定が可能になりました
obj = Object.new
def obj.foo
rescue
ensure
end
: ((<String>))#count
: ((<String>))#delete
: ((<String>))#squeeze
: ((<String>))#tr
: ((<String>))#tr_s
'\-' で '-' を指定可能になりました(tr! 等、bang method も同様)。
以前は... -
Net
:: HTTPHeader # basic _ auth(account , password) -> [String] (201.0) -
Authorization: ヘッダを BASIC 認証用にセットします。
...Authorization: ヘッダを BASIC 認証用にセットします。
@param account アカウント名を文字列で与えます。
@param password パスワードを文字列で与えます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net:... -
Net
:: HTTPHeader # proxy _ basic _ auth(account , password) -> [String] (201.0) -
Proxy 認証のために 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", "pass... -
UnboundMethod
# inspect -> String (126.0) -
self を読みやすい文字列として返します。
...self を読みやすい文字列として返します。
詳しくは Method#inspect を参照してください。
//emlist[例][ruby]{
String.instance_method(:count).inspect # => "#<UnboundMethod: String#count>"
//}
@see Method#inspect... -
UnboundMethod
# to _ s -> String (126.0) -
self を読みやすい文字列として返します。
...self を読みやすい文字列として返します。
詳しくは Method#inspect を参照してください。
//emlist[例][ruby]{
String.instance_method(:count).inspect # => "#<UnboundMethod: String#count>"
//}
@see Method#inspect...