78件ヒット
[1-78件を表示]
(0.110秒)
クラス
-
Scanf
:: FormatString (18) - String (12)
- UnboundMethod (24)
モジュール
-
Net
:: HTTPHeader (24)
キーワード
-
basic
_ auth (12) - inspect (12)
-
matched
_ count (6) -
proxy
_ basic _ auth (12) - prune (6)
-
spec
_ count (6) -
to
_ s (12)
検索結果
先頭5件
-
String
# count(*chars) -> Integer (27138.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
:: FormatString # matched _ count (9118.0) -
@todo
...@todo... -
Scanf
:: FormatString # spec _ count (9118.0) -
@todo
...@todo... -
Scanf
:: FormatString # prune(n=matched _ count) (3118.0) -
@todo
...@todo... -
Net
:: HTTPHeader # basic _ auth(account , password) -> [String] (214.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] (214.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",... -
UnboundMethod
# inspect -> String (133.0) -
self を読みやすい文字列として返します。
...self を読みやすい文字列として返します。
詳しくは Method#inspect を参照してください。
//emlist[例][ruby]{
String.instance_method(:count).inspect # => "#<UnboundMethod: String#count>"
//}
@see Method#inspect... -
UnboundMethod
# to _ s -> String (133.0) -
self を読みやすい文字列として返します。
...self を読みやすい文字列として返します。
詳しくは Method#inspect を参照してください。
//emlist[例][ruby]{
String.instance_method(:count).inspect # => "#<UnboundMethod: String#count>"
//}
@see Method#inspect...