ライブラリ
- ビルトイン (173)
-
cgi
/ core (22) - csv (25)
- dbm (11)
- json (11)
- matrix (22)
- open3 (44)
- openssl (33)
- optparse (132)
- rake (11)
-
rexml
/ document (33) -
rinda
/ tuplespace (11) -
webrick
/ httputils (11) -
win32
/ registry (11) - win32ole (33)
クラス
- Array (50)
-
CGI
:: Cookie (11) -
CSV
:: Row (11) -
CSV
:: Table (11) - DBM (11)
- Enumerator (22)
- Hash (71)
-
JSON
:: Parser (11) - MatchData (11)
- Matrix (22)
-
OpenSSL
:: X509 :: ExtensionFactory (33) - OptionParser (132)
-
REXML
:: Element (11) -
REXML
:: Entity (22) -
Rake
:: TaskArguments (11) -
Rinda
:: TupleEntry (11) - String (11)
-
WIN32OLE
_ VARIANT (33) -
Win32
:: Registry (11)
モジュール
-
CGI
:: QueryExtension :: Value (22) - Open3 (44)
-
WEBrick
:: HTTPUtils (11)
オブジェクト
- ENV (11)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - Marshal フォーマット (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 2 . 0 (10) -
NEWS for Ruby 2
. 4 . 0 (8) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) - RARRAY (11)
- Ruby用語集 (11)
- [] (11)
- []= (11)
-
add
_ attributes (11) - array (11)
- coerce (11)
- compact (8)
- compact! (8)
-
create
_ ext _ from _ array (11) -
create
_ extension (22) - diagonal (11)
-
mark
_ locations _ array (11) - names (11)
- new (66)
-
next
_ values (11) - on (132)
- pack (19)
- pack テンプレート文字列 (11)
-
peek
_ values (11) -
pipeline
_ r (22) -
pipeline
_ start (22) - rassoc (22)
-
rb
_ Array (11) -
rb
_ ary _ new (11) -
rb
_ ary _ new2 (11) -
rb
_ ary _ new3 (11) -
rb
_ ary _ to _ s (11) -
rb
_ check _ convert _ type (11) -
rb
_ f _ array (11) -
rdoc
/ parser / c (11) - rss (11)
-
ruby 1
. 8 . 4 feature (11) -
ruby 1
. 9 feature (11) - select (11)
- shift (11)
-
split
_ header _ value (11) -
to
_ a (11) -
to
_ ary (11) -
to
_ csv (3) -
to
_ h (17) - unpack (11)
-
values
_ at (55) - クラス/メソッドの定義 (11)
検索結果
先頭5件
-
Array
# values _ at(*selectors) -> Array (27201.0) -
引数で指定されたインデックスに対応する要素を配列で返します。インデッ クスに対応する値がなければ nil が要素になります。
...ry.values_at( 0, 2, 4 ) #=> ["a", "c", "e"]
p ary.values_at( 3, 4, 5, 6, 35 ) #=> ["d", "e", nil, nil, nil]
p ary.values_at( 0, -1, -2 ) #=> ["a", "e", "d"]
p ary.values_at( -4, -5, -6, -35 ) #=> ["b", "a", nil, nil]
p ary.values_at( 1..2 ) #=> ["b", "c"]
p ary.values_......at( 3..10 ) #=> ["d", "e", nil, nil, nil, nil, nil, nil]
p ary.values_at( 6..7 ) #=> [nil, nil]
p ary.values_at( 0, 3..5 ) #=> ["a", "d", "e", nil]
//}... -
Array
# pack(template) -> String (21024.0) -
配列の内容を template で指定された文字列にしたがって、 バイナリとしてパックした文字列を返します。
...template 自身のバイナリとしてパックするためのテンプレートを文字列で指定します。
以下にあげるものは、Array#pack、String#unpack
のテンプレート文字の一覧です。テンプレート文字は後に「長さ」を表す数字
を続けること......endian int32_t
l!<: little endian signed long
//}
=== 各テンプレート文字の説明
説明中、Array#pack と String#unpack で違いのあるものは `/' で区切って
「Array#pack の説明 / String#unpack の説明」としています。
: a
ASCII文字列(ヌル文字を詰......"
[0x7fffffff].pack("U") # => "\xFD\xBF\xBF\xBF\xBF\xBF"
[0x80000000].pack("U") # => RangeError: pack(U): value out of range
[0,256,65536].pack("U3").b # => "\x00\xC4\x80\xF0\x90\x80\x80"
"\x00\xC4\x80\xF0\x90\x80\x80".unpack("U3") # => [0,......ます。
指定した場合は返値も指定した文字列オブジェクトになります。
以下にあげるものは、Array#pack、String#unpack、String#unpack1
のテンプレート文字の一覧です。テンプレート文字は後に「長さ」を表す数字
を... -
Array
# pack(template , buffer: String . new) -> String (21024.0) -
配列の内容を template で指定された文字列にしたがって、 バイナリとしてパックした文字列を返します。
...ます。
指定した場合は返値も指定した文字列オブジェクトになります。
以下にあげるものは、Array#pack、String#unpack、String#unpack1
のテンプレート文字の一覧です。テンプレート文字は後に「長さ」を表す数字
を......endian int32_t
l!<: little endian signed long
//}
=== 各テンプレート文字の説明
説明中、Array#pack と String#unpack で違いのあるものは `/' で区切って
「Array#pack の説明 / String#unpack の説明」としています。
: a
ASCII文字列(ヌル文字を詰......"
[0x7fffffff].pack("U") # => "\xFD\xBF\xBF\xBF\xBF\xBF"
[0x80000000].pack("U") # => RangeError: pack(U): value out of range
[0,256,65536].pack("U3").b # => "\x00\xC4\x80\xF0\x90\x80\x80"
"\x00\xC4\x80\xF0\x90\x80\x80".unpack("U3") # => [0,... -
Array
# to _ csv(**options) -> String (21018.0) -
CSV.generate_line(self, options) と同様です。
...CSV.generate_line(self, options) と同様です。
Array オブジェクトを 1 行の CSV 文字列に変換するためのショートカットです。
@param options CSV.generate_line と同様のオプションを指定します。
//emlist[][ruby]{
require 'csv'
p [1, 'Matz', :Ruby, Dat....../emlist[][ruby]{
require 'csv'
puts [1, nil].to_csv # => 1,
puts [1, nil].to_csv(write_nil_value: "N/A") # => 1,N/A
puts [2, ""].to_csv # => 2,""
puts [2, ""].to_csv(write_empty_value: "BLANK") # => 2,BLANK
//}
@see CSV.generate_line... -
Array
# to _ h -> Hash (21016.0) -
self を [key, value] のペアの配列として解析した結果を Hash にして 返します。
...self を [key, value] のペアの配列として解析した結果を Hash にして
返します。
//emlist[例][ruby]{
bar], [1, 2.to_h # => {:foo => :bar, 1 => 2}
//}......self を [key, value] のペアの配列として解析した結果を Hash にして
返します。
//emlist[例][ruby]{
bar], [1, 2.to_h # => {:foo => :bar, 1 => 2}
//}
ブロックを指定すると配列の各要素でブロックを呼び出し、
その結果をペアとして使います... -
Array
# to _ h { block } -> Hash (21016.0) -
self を [key, value] のペアの配列として解析した結果を Hash にして 返します。
...self を [key, value] のペアの配列として解析した結果を Hash にして
返します。
//emlist[例][ruby]{
bar], [1, 2.to_h # => {:foo => :bar, 1 => 2}
//}
ブロックを指定すると配列の各要素でブロックを呼び出し、
その結果をペアとして使います... -
CGI
:: Cookie # value -> Array (18202.0) -
クッキーの値を返します。
クッキーの値を返します。 -
Rinda
:: TupleEntry # value -> Array | Hash (18202.0) -
管理対象のタプルを返します。
管理対象のタプルを返します。 -
static VALUE rb
_ f _ array(VALUE obj , VALUE arg) (6416.0) -
Kernel.#Array の実体です。
...Kernel.#Array の実体です。... -
VALUE rb
_ Array(VALUE obj) (6332.0) -
obj が Array でない場合は to_a を使って Array に変換します。
...obj が Array でない場合は to_a を使って
Array に変換します。... -
struct RArray * RARRAY(VALUE obj) (6300.0)
-
obj を struct RArray* にキャストする。 本当は obj が struct RArray* でないとしてもキャストしてしまう。
...obj を struct RArray* にキャストする。
本当は obj が struct RArray* でないとしてもキャストしてしまう。...