るりまサーチ

最速Rubyリファレンスマニュアル検索!
77件ヒット [1-77件を表示] (0.040秒)
トップページ > クエリ:object[x] > クエリ:nil[x] > クエリ:field[x]

別のキーワード

  1. objectspace each_object
  2. _builtin each_object
  3. object send
  4. object enum_for
  5. object public_send

ライブラリ

クラス

キーワード

検索結果

CSV::Row#field(header_or_index, minimum_index = 0) -> object | nil (15333.0)

ヘッダの名前かインデックスで値を取得します。フィールドが見つからなかった場合は nil を返します。

...ヘッダの名前かインデックスで値を取得します。フィールドが見つからなかった場合は nil を返します。

@param header_or_index ヘッダの名前かインデックスを指定します。

@param minimum_index このインデックスより後で、ヘッダの...
...ているヘッダがある場合に便利です。

//emlist[例][ruby]{
require "csv"

row = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])

row.field("header1") # => "row1_1"
row.field("header2") # => "row1_2"
row["header1"] # => "row1_1"
row["header2"] # => "row1_2"
//}...

OpenStruct#delete_field(name) -> object (6208.0)

nameで指定された要素を削除します。

...nameで指定された要素を削除します。

その後その要素を参照したら nil が返ります。

@param name 削除する要素を文字列かシンボルで指定します。
@return 削除前の要素の値を返します。...

CSV::Row#delete(header_or_index, minimum_index = 0) -> [object, object] | nil (315.0)

ヘッダの名前かインデックスで行からフィールドを削除するために使用します。

...る場合に便利です。

@return 削除したヘッダとフィールドの組を返します。削除対象が見つからなかった場合は nil を返します。

//emlist[例 ヘッダの名前で指定][ruby]{
require "csv"

row = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"]...
...][ruby]{
require "csv"

row = CSV::Row.new(["header1", "header2", "header1"], ["row1_1", "row1_2", "row1_3"])

row # => #<CSV::Row "header1":"row1_1" "header2":"row1_2" "header1":"row1_3">
row.delete("header1", 1)
row # => #<CSV::Row "header1":"row1_1" "header2":"row1_2">
//}

@see CSV::Row#field...

CSV::Row#[](header_or_index, minimum_index = 0) -> object | nil (233.0)

ヘッダの名前かインデックスで値を取得します。フィールドが見つからなかった場合は nil を返します。

...ヘッダの名前かインデックスで値を取得します。フィールドが見つからなかった場合は nil を返します。

@param header_or_index ヘッダの名前かインデックスを指定します。

@param minimum_index このインデックスより後で、ヘッダの...
...ているヘッダがある場合に便利です。

//emlist[例][ruby]{
require "csv"

row = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])

row.field("header1") # => "row1_1"
row.field("header2") # => "row1_2"
row["header1"] # => "row1_1"
row["header2"] # => "row1_2"
//}...

ruby 1.8.4 feature (72.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...[i686-linux]
-:1: empty symbol literal

: Symbol [bug]

#Sat Oct 22 13:26:57 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
#
# * object.c (sym_inspect), parse.y (parser_yylex, rb_symname_p): check
# if valid as a symbol name more strictly. [ruby-dev:27478]
#
# * tes...
...z]+x[0-9]+$/ =~ "hogex111")
p(/^[\x61-\x7a]+x[0-9]+$/ =~ "hogex111")

# => ruby 1.8.3 (2005-09-21) [i686-linux]
0
nil

# => ruby 1.8.4 (2005-12-22) [i686-linux]
0
0

: シグナル [bug]

#Sun Oct 16 03:38:07 2005 Yukihiro M...
...#do_GET): the value of Set-Cookie:
# header field should be splited into each cookie. [ruby-Bugs:2199]
#
# * lib/webrick/cookie.rb (WEBrick::Cookie.parse_set_cookie): new method
# to parse the value of Set-Cookie: header field.
#
# * test/webrick/test_cookie.rb, test/web...

絞り込み条件を変える

ruby 1.8.3 feature (54.0)

ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))

...y-talk:146894>))
$ cat test_dlg.rb
foo = Object.new
foo2 = SimpleDelegator.new(foo)
def foo.bar
puts "bar"
end
foo2.bar

$ ruby-1.8.2 -r delegate test_dlg.rb
test_dlg.rb:6: undefined method `bar' for #<Object:0x4021b0a0> (NoMethodError)

$ ruby-1....
...オプションに -w を付けた時に出ます。((<ruby-dev:26201>))

=== 2005-05-22
: OpenSSL::SSL::SSLServer#initialize(svr, ctx, session_id=nil)
session_id を受け付けるようになりました。((<ruby-core:4663>))

=== 2005-05-19
: REXML::Encoding#decode_sjis [lib] [bug]
: REXML::...
...渡された時に false ではなく nil を返すようになりました。
((<ruby-dev:25811>))

$ ruby-1.8.2 -e 'p "a" <=> 1'
false
$ ruby-1.8.3 -e 'p "a" <=> 1'
nil



=== 2005-03-06
: HTTPHeader#get_fields [lib][new]
: HTTPHeader#add_field [lib][new]

追加。((<ruby-list...

CSV.new(data, options = Hash.new) -> CSV (42.0)

このメソッドは CSV ファイルを読み込んだり、書き出したりするために String か IO のインスタンスをラップします。

...す。
A sequence will be selected even if it occurs in a quoted field, assuming that you
would have the same line endings there. If none of those sequences is
found, +data+ is ARGF, Object::STDIN, Object::STDOUT, or
Object
::STDERR, or the stream is only available for output, the default...
...$INPUT_RECORD_SEPARATOR ($/) is used. Obviously,
discovery takes a little time. Set manually if speed is important. Also
note that IO objects should be opened in binary mode on Windows if this
feature will be used as the line-ending translation can cause
problems with resetting the d...
...limit to
prevent what are effectively DoS attacks on the parser. However, this
limit can cause a legitimate parse to fail and thus is set to +nil+, or off,
by default.
: :converters
CSV::Converters から取り出した名前の配列です。変換器が一つだけ
の場合は配列...