るりまサーチ

最速Rubyリファレンスマニュアル検索!
23件ヒット [1-23件を表示] (0.317秒)

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

ライブラリ

クラス

キーワード

検索結果

Array#difference(*other_arrays) -> Array (26114.0)

自身から other_arrays の要素を取り除いた配列を生成して返します。

...素の順は self における要素の順と同じです。

//emlist[例][ruby]{
[ 1, 1, 2, 2, 3, 3, 4, 5 ].difference([ 1, 2, 4 ]) # => [ 3, 3, 5 ]
[ 1, 'c', :s, 'yep' ].difference([ 1 ], [ 'a', 'c' ]) # => [:s, "yep"]
//}

集合のような振る舞いが必要なら Set も参照し...

Time#strftime(format) -> String (8025.0)

時刻を format 文字列に従って文字列に変換した結果を返します。

...ended)
p t.strftime("%H%M%S%z") # => 040506+0900 Local time and the difference from UTC (basic)
p t.strftime("%T%:z") # => 04:05:06+09:00 Local time and the difference from UTC (extended)
p t.strftime("%Y%m%dT%H%M%S%z") # => 20010203T040506+0900 Date...
...Ordinal date and UTC of day (extended)
p t.strftime("%GW%V%uT%H%M%z") # => 2001W056T0405+0900 Week date and local time and difference from UTC (basic)
p t.strftime("%G-W%V-%uT%R%:z") # => 2001-W05-6T04:05+09:00 Week date and local time and difference from UTC (extended)
//}...

Array#-(other) -> Array (8007.0)

自身から other の要素を取り除いた配列を生成して返します。

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

//emlist[例][ruby]{
[1, 2, 1, 3, 1, 4] - [4, 2] # => [1, 1, 3, 1]

[1, 2, 1, 3, 1, 4] - [1, 4] # => [2, 3]
//}


@see Array#difference...