ライブラリ
- English (44)
- ビルトイン (265)
-
cgi
/ html (44) - csv (22)
- erb (11)
-
net
/ ftp (132) -
net
/ http (209) -
net
/ imap (33) - objspace (33)
- openssl (253)
- psych (6)
-
rexml
/ document (22) -
ripper
/ lexer (11) -
rubygems
/ package / tar _ output (11) - socket (44)
- uri (22)
-
webrick
/ httputils (55) -
win32
/ registry (22)
クラス
- BasicSocket (33)
- CSV (22)
- Data (2)
- ERB (11)
-
Gem
:: Package :: TarOutput (11) - MatchData (158)
-
Net
:: FTP (132) -
Net
:: HTTP (176) -
Net
:: IMAP (22) -
Net
:: IMAP :: ResponseCode (11) - Object (11)
-
OpenSSL
:: ASN1 :: Constructive (11) -
OpenSSL
:: ASN1 :: Primitive (11) -
OpenSSL
:: Digest (11) -
OpenSSL
:: Digest :: DSS (11) -
OpenSSL
:: Digest :: DSS1 (11) -
OpenSSL
:: Digest :: MD2 (11) -
OpenSSL
:: Digest :: MD4 (11) -
OpenSSL
:: Digest :: MD5 (11) -
OpenSSL
:: Digest :: MDC2 (11) -
OpenSSL
:: Digest :: RIPEMD160 (11) -
OpenSSL
:: Digest :: SHA (11) -
OpenSSL
:: Digest :: SHA1 (11) -
OpenSSL
:: Digest :: SHA224 (11) -
OpenSSL
:: Digest :: SHA256 (11) -
OpenSSL
:: Digest :: SHA384 (11) -
OpenSSL
:: Digest :: SHA512 (11) -
OpenSSL
:: Engine (22) -
OpenSSL
:: PKCS7 (33) -
REXML
:: CData (11) -
REXML
:: Entity (11) - Regexp (22)
- Ripper (11)
-
RubyVM
:: InstructionSequence (9) -
Socket
:: AncillaryData (11) - String (11)
- Symbol (8)
-
WEBrick
:: HTTPUtils :: FormData (55) -
Win32
:: Registry (22)
モジュール
-
CGI
:: HtmlExtension (44) -
GC
:: Profiler (11) - Kernel (55)
-
Net
:: HTTPHeader (33) - ObjectSpace (33)
-
OpenSSL
:: ASN1 (11) - Process (22)
- Psych (6)
- URI (22)
キーワード
-
$ INPUT _ RECORD _ SEPARATOR (11) -
$ LAST _ MATCH _ INFO (11) -
$ LAST _ PAREN _ MATCH (11) -
$ RS (11) -
$ ~ (11) - ASN1 (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 3 . 0 (9) -
NEWS for Ruby 2
. 4 . 0 (8) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 3
. 0 . 0 (4) - ReFe (11)
- Ruby用語集 (11)
- [] (55)
- begin (11)
- byteoffset (4)
- captures (11)
-
content
_ type (11) -
content
_ type= (11) -
count
_ objects _ size (11) -
count
_ tdata _ objects (11) - csv (11)
- data (11)
- decode (11)
-
deconstruct
_ keys (2) -
encode
_ www _ form (11) -
encode
_ www _ form _ component (11) - encrypt (11)
- end (11)
-
field
_ size _ limit (11) - filename (11)
- filename= (11)
- get (22)
- getbinaryfile (22)
- inspect (11)
-
last
_ match (11) -
load
_ private _ key (11) -
load
_ public _ key (11) - match (30)
-
memsize
_ of _ all (11) -
multipart
_ form (44) - name (11)
- name= (11)
-
named
_ captures (11) - names (11)
- ndata (11)
-
net
/ http (11) - new (187)
- offset (22)
- open (11)
- patch (22)
- post (22)
- post2 (22)
- put (33)
- put2 (22)
- putbinaryfile (22)
-
raw
_ data (11) - read (11)
- recvmsg (11)
-
recvmsg
_ nonblock (11) - request (22)
-
request
_ post (22) -
request
_ put (22) - retrbinary (22)
-
ruby 1
. 8 . 4 feature (11) -
ruby 1
. 9 feature (11) -
safe
_ load (6) -
send
_ request (11) - sendmsg (11)
-
set
_ content _ type (11) - setrlimit (22)
- storbinary (22)
- store (11)
- tagging (22)
-
to
_ a (11) -
to
_ binary (9) -
token
_ match (11) -
uid
_ store (11) -
unix
_ rights (11) -
values
_ at (11) - verify (11)
- write (11)
-
write
_ smime (11) - メソッド呼び出し(super・ブロック付き・yield) (11)
- 制御構造 (11)
検索結果
先頭5件
-
Object
:: DATA -> File (18209.0) -
スクリプトの __END__ プログラムの終り以降をアクセスする File オブジェクト。
...んでおくことができます。
DATA 定数はそのデータ部分にアクセスするための File オブジェクトを保持しています。
__END__ を含まないプログラムにおいては DATA は定義されません。
=== 注意
* DATA.rewind で移動する読みとり......ル ($0) を指します。
=== 例1
print DATA.gets # => 故人西辞黄鶴楼
print DATA.gets # => 烟花三月下揚州
print DATA.gets # => 孤帆遠影碧空尽
print DATA.gets # => 唯見長江天際流
DATA.gets # => nil
__END__
故人西辞黄鶴楼......江天際流
=== 例2
sum = 0
DATA.each_line do |line|
sum += line.to_i
end
DATA.rewind
p DATA.gets # => "sum = 0¥n"
__END__
17
19
23
29
31
=== 例3
DATA.gets # => uninitialized constant DATA (NameError)
=== 例4
ファイル... -
Data
# deconstruct _ keys(array _ of _ names _ or _ nil) -> hash (9149.0) -
self のメンバの名前と値の組を Hash で返します。
...self のメンバの名前と値の組を Hash で返します。
//emlist[例][ruby]{
Measure = Data.define(:amount, :unit)
distance = Measure.new(10, 'km')
distance.deconstruct_keys(nil) # => {:amount=>10, :unit=>"km"}
distance.deconstruct_keys([:amount]) # => {:amount=>10}
//}
このメ......ソッドは以下のようにパターンマッチで利用されます。
//emlist[例][ruby]{
Measure = Data.define(:amount, :unit)
distance = Measure.new(10, 'km')
case distance
in amount:, unit: 'km' # 裏側で #deconstruct_keys を呼ぶ
puts "It is #{amount} kilometers away"
else
puts......mes_or_nil 返り値に含めるメンバの名前の配列を指定します。nil の場合は全てのメンバを意味します。
[注意] 本メソッドの記述は Data のサブクラスのインスタンスに対して呼び
出す事を想定しています。Data.define は Data のサ... -
ObjectSpace
. # count _ tdata _ objects(result _ hash = nil) -> Hash (6229.0) -
T_DATA の種類ごとにオブジェクトの数を格納したハッシュを返します。
...T_DATA の種類ごとにオブジェクトの数を格納したハッシュを返します。
@param result_hash 戻り値のためのハッシュを指定します。省略した場合は新
しくハッシュを作成します。result_hash の内容は上書き......ruby]{
ObjectSpace.count_tdata_objects
# => {RubyVM::InstructionSequence=>504, :parser=>5, :barrier=>6,
# :mutex=>6, Proc=>60, RubyVM::Env=>57, Mutex=>1, Encoding=>99,
# ThreadGroup=>1, Binding=>1, Thread=>1, RubyVM=>1, :iseq=>1,
# Random=>1, ARGF.class=>1, Data=>1, :autoload=>3, Time=>2......ラスオブジェクトです。それ
以外の内部的なオブジェクトの場合、キーはシンボルです。シンボルの値は
rb_data_type_struct に格納された名前が使用されます。
戻り値のハッシュは処理系に依存します。これは将来変更になる... -
GC
:: Profiler . raw _ data -> [Hash , . . . ] | nil (6224.0) -
GC のプロファイル情報を GC の発生ごとに Hash の配列 (:GC_INVOKE_TIME が早いもの順)で返します。GC::Profiler が有効になっ ていない場合は nil を返します。
...(:GC_INVOKE_TIME が早いもの順)で返します。GC::Profiler が有効になっ
ていない場合は nil を返します。
例:
GC::Profiler.enable
GC.start
GC::Profiler.raw_data
# => [
{
:GC_TIME=>1.3000000000000858e-05,
:GC_INVOKE_TIME=>0.010634999999999999,... -
Net
:: IMAP :: ResponseCode # data -> object | nil (6208.0) -
レスポンスコードのデータを返します。
...レスポンスコードのデータを返します。
レスポンスコードの種類によって返すオブジェクトは異なります。
ない場合は nil を返します。... -
REXML
:: Entity # ndata -> String | nil (6207.0) -
解析対象外実体(unparsed entity)宣言である場合には その記法名(notation name)を返します。
...解析対象外実体(unparsed entity)宣言である場合には
その記法名(notation name)を返します。
それ以外の場合は nil を返します。... -
MatchData
# byteoffset(name) -> [Integer , Integer] | [nil , nil] (3230.0) -
name という名前付きグループに対応する部分文字列のバイト単位のオフセットの 配列 [start, end] を返します。
...位のオフセットの
配列 [start, end] を返します。
nameの名前付きグループにマッチした部分文字列がなければ
[nil, nil] を返します。
@param name 名前(シンボルか文字列)
@raise IndexError 正規表現中で定義されていない name を指定し......') # => [0, 4]
p $~.byteoffset(:year) # => [0, 4]
p $~.byteoffset('month') # => [7, 8]
p $~.byteoffset(:month) # => [7, 8]
p $~.byteoffset('day') # => [nil, nil]
p $~.byteoffset('century') # => `offset': undefined group name reference: century (IndexError)
//}
@see MatchData#offset... -
MatchData
# offset(name) -> [Integer , Integer] | [nil , nil] (3230.0) -
name という名前付きグループに対応する部分文字列のオフセットの配列 [start, end] を返 します。
...by]{
[ self.begin(name), self.end(name) ]
//}
と同じです。nameの名前付きグループにマッチした部分文字列がなければ
[nil, nil] を返します。
@param name 名前(シンボルか文字列)
@raise IndexError 正規表現中で定義されていない name を指定し......('year') # => [0, 4]
p $~.offset(:year) # => [0, 4]
p $~.offset('month') # => [5, 6]
p $~.offset(:month) # => [5, 6]
p $~.offset('day') # => [nil, nil]
p $~.offset('century') # => `offset': undefined group name reference: century (IndexError)
//}
@see MatchData#begin, MatchData#end......0, 4]
p $~.offset(:year) # => [0, 4]
p $~.offset('month') # => [5, 6]
p $~.offset(:month) # => [5, 6]
p $~.offset('day') # => [nil, nil]
p $~.offset('century') # => `offset': undefined group name reference: century (IndexError)
//}
@see MatchData#begin, MatchData#end, MatchData#offset... -
MatchData
# byteoffset(n) -> [Integer , Integer] | [nil , nil] (3220.0) -
n 番目の部分文字列のバイト単位のオフセットの 配列 [start, end] を返します。
...のオフセットの
配列 [start, end] を返します。
n番目の部分文字列がマッチしていなければ [nil, nil] を返します。
@param n 部分文字列を指定する数値
@raise IndexError 範囲外の n を指定した場合に発生します。
@see MatchData#offset... -
MatchData
# offset(n) -> [Integer , Integer] | [nil , nil] (3220.0) -
n 番目の部分文字列のオフセットの配列 [start, end] を返 します。
...lf.begin(n), self.end(n) ]
//}
と同じです。n番目の部分文字列がマッチしていなければ
[nil, nil] を返します。
@param n 部分文字列を指定する数値
@raise IndexError 範囲外の n を指定した場合に発生します。
@see MatchData#begin, MatchData#end......end(n) ]
//}
と同じです。n番目の部分文字列がマッチしていなければ
[nil, nil] を返します。
@param n 部分文字列を指定する数値
@raise IndexError 範囲外の n を指定した場合に発生します。
@see MatchData#begin, MatchData#end, MatchData#offset... -
REXML
:: CData . new(text , respect _ whitespace = true , parent = nil) -> REXML :: CData (3201.0) -
text をテキストとして持つ CData オブジェクトを生成します。
...text をテキストとして持つ CData オブジェクトを生成します。
respect_whitespace に真を指定すると、text に含まれる空白文字は保存されます。
偽の場合は空白はまとめられます。
@param text テキスト文字列
@param respect_whitespace 空......Data.new("foo bar baz "))
doc.to_s # => "<root><![CDATA[foo bar baz ]]></root>\n"
doc = REXML::Document.new(<<EOS)
<root />
EOS
doc.root.add(REXML::CData.new("foo bar baz ", true))
doc.root.add(REXML::CData.new("foo bar baz ", false))
doc.to_s # => "<root><![CDATA[foo bar baz ]]><![CDATA... -
WEBrick
:: HTTPUtils :: FormData # [](header) -> String | nil (3133.0) -
自身が multipart/form-data なデータの場合に、header で指定された ヘッダの値を文字列で返します。無ければ nil を返します。
...自身が multipart/form-data なデータの場合に、header で指定された
ヘッダの値を文字列で返します。無ければ nil を返します。
@param header ヘッダ名を文字列で指定します。大文字と小文字を区別しません。
例:
require "webrick/cgi...