るりまサーチ

最速Rubyリファレンスマニュアル検索!
1825件ヒット [1-100件を表示] (0.115秒)
トップページ > クエリ:object[x] > クエリ:>[x] > クエリ:at[x] > 種類:インスタンスメソッド[x]

別のキーワード

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

ライブラリ

キーワード

検索結果

<< 1 2 3 ... > >>

JSON::State#object_nl -> String (21226.0)

JSON 形式の文字列中に現れる JavaScript のオブジェクトの行末に挿入する文字列を返します。

...on_state = JSON::State.new(object_nl: "")
json_state.object_nl # => ""
puts JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => [1,2,{"name":"tanaka","age":19}]

json_state = JSON::State.new(object_nl: "\n")
json_state.object_nl # => "\n"
puts JSON.generate([1...
..., 2, { name: "tanaka", age: 19 }], json_state)

# => [1,2,{
# "name":"tanaka",
# "age":19
# }]
//}...

Array#at(nth) -> object | nil (15304.0)

nth 番目の要素を返します。nth 番目の要素が存在しない時には nil を返します。

...みます。

@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。

//emlist[例][ruby]{
a = [ "a", "b", "c", "d", "e" ]
a[0] #=> "a"
a[1] #=> "b"
a[-1] #=> "e"
a[-2] #=> "d"
a[10] #=> nil
//}...

Object#private_methods(include_inherited = true) -> [Symbol] (15213.0)

そのオブジェクトが理解できる private メソッド名の一覧を返します。

...が理解できる private メソッド名の一覧を返します。

@param include_inherited 偽となる値を指定すると自身のクラスのスーパークラスで定義されたメソッドを除きます。


@see Module#private_instance_methods,Object#methods,Object#singleton_methods...

Object#must_match(regexp) -> true (15201.0)

自身が与えられた正規表現にマッチした場合、検査にパスしたことになります。

...文字列を指定した場合は文字列そのものにマッチする
正規表現に変換してから使用します。

@raise MiniTest::Assertion 自身が与えられた正規表現にマッチしなかった場合に発生します。

@see MiniTest::Assertions#assert_match...

JSON::Generator::GeneratorMethods::String#to_json_raw_object -> Hash (12208.0)

生の文字列を格納したハッシュを生成します。

...する場合に使用してください。

require 'json'
"にほんご".encode("euc-jp").to_json_raw_object
# => {"json_class"=>"String", "raw"=>[164, 203, 164, 219, 164, 243, 164, 180]}
"にほんご".encode("euc-jp").to_json # source sequence is illegal/malformed (JSON::GeneratorError)...

絞り込み条件を変える

Net::IMAP::FetchData#attr -> { String => object } (9402.0)

各メッセージのアトリビュートの値をハッシュテーブルで返します。

...::BodyTypeMessage, Net::IMAP::BodyTypeMultipart
のいずれか。
: BODY[<section>]<<partial>>
section で指定されたセクションのボディの内容。文字列。
: BODY.PEEK[<section>]<<partial>>
section で指定されたセクションのメッセージボディの内容。...
...文字列。
ただしこれで内容を見ても :Seen フラグを設定しない点が
BODY[<section>]と同様
: BODYSTRUCTURE
MIME-IMB でのメッセージボディ。
Net::IMAP::BodyTypeBasic, Net::IMAP::BodyTypeText,
Net::IMAP::BodyTypeMessage, Net::IMAP::BodyTypeMultipar...
...メッセージにセットされたフラグ。
Symbol の配列。String#capitalize でキャピタライズ
されている。
: INTERNALDATE
メッセージの内部日付。文字列。
: RFC822
BODY[] と同じ。文字列。
: RFC822.HEADER
BODY.PEEK[HEADER] と同じ。...

Enumerator#with_object(obj) -> Enumerator (9316.0)

繰り返しの各要素に obj を添えてブロックを繰り返し、obj を返り値として返します。

...erator を返します。

//emlist[例][ruby]{
# 0,1,2 と呼びだす enumeratorを作る
to_three = Enumerator.new do |y|
3.times do |x|
y << x
end
end

to_three_with_string = to_three.with_object("foo")
to_three_with_string.each do |x,string|
puts "#{string}: #{x}"
end
# => foo:0
# =>...
...foo:1
# => foo:2
//}

@param obj 繰り返しの各要素に添えて渡されるオブジェクト
@see Enumerable#each_with_object...

Enumerator#with_object(obj) {|(*args), memo_obj| ... } -> object (9316.0)

繰り返しの各要素に obj を添えてブロックを繰り返し、obj を返り値として返します。

...erator を返します。

//emlist[例][ruby]{
# 0,1,2 と呼びだす enumeratorを作る
to_three = Enumerator.new do |y|
3.times do |x|
y << x
end
end

to_three_with_string = to_three.with_object("foo")
to_three_with_string.each do |x,string|
puts "#{string}: #{x}"
end
# => foo:0
# =>...
...foo:1
# => foo:2
//}

@param obj 繰り返しの各要素に添えて渡されるオブジェクト
@see Enumerable#each_with_object...

Prime::PseudoPrimeGenerator#with_object(obj) -> Enumerator (9310.0)

与えられた任意のオブジェクトと要素をブロックに渡して評価します。

...bj 任意のオブジェクトを指定します。
@return 最初に与えられたオブジェクトを返します。
@return ブロックを与えられた場合は obj を返します。ブロックを与えられなかった場合は Enumerator を返します。

@see Enumerator#with_object...

Prime::PseudoPrimeGenerator#with_object(obj) {|prime, obj| ... } -> object (9310.0)

与えられた任意のオブジェクトと要素をブロックに渡して評価します。

...bj 任意のオブジェクトを指定します。
@return 最初に与えられたオブジェクトを返します。
@return ブロックを与えられた場合は obj を返します。ブロックを与えられなかった場合は Enumerator を返します。

@see Enumerator#with_object...

絞り込み条件を変える

<< 1 2 3 ... > >>