るりまサーチ

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

別のキーワード

  1. kernel require
  2. getoptlong require_order
  3. rubygems/custom_require require
  4. irb/ext/use-loader irb_require
  5. require execute

ライブラリ

クラス

モジュール

検索結果

Pathname#entries -> [Pathname] (18126.0)

self に含まれるファイルエントリ名を元にした Pathname オブジェクトの配列を返します。

...在しないパスであったりディレクトリでなければ例外が発生します。

//emlist[例][ruby]{
require
'pathname'
require
'pp'

pp Pathname('/usr/local').entries
# => [#<Pathname:.>,
# #<Pathname:..>,
# #<Pathname:bin>,
# #<Pathname:etc>,
# #<Pathname:include>,
#...
...#<Pathname:lib>,
# #<Pathname:opt>,
# #<Pathname:sbin>,
# #<Pathname:share>,
# #<Pathname:var>]
//}

@see Dir.entries...

Enumerable#entries(*args) -> [object] (18114.0)

全ての要素を含む配列を返します。

...@param args each の呼び出し時に引数として渡されます。

//emlist[例][ruby]{
(1..7).to_a #=> [1, 2, 3, 4, 5, 6, 7]
{ 'a'=>1, 'b'=>2, 'c'=>3 }.to_a #=> [["a", 1], ["b", 2], ["c", 3]]

require
'prime'
Prime.entries 10 #=> [2, 3, 5, 7]
//}...

Range#entries -> Array (18108.0)

self を配列に変換します。

...y]{
p (5..0).to_a # => []
p (0..3).to_a # => [0, 1, 2, 3]
p ('a'..'c').to_a # => ["a", "b", "c"]
p (:a..:d).to_a # => [:a, :b, :c, :d]

require
'date'
p (Date.new(1965, 4, 14) .. Date.new(1965, 4, 14)).to_a # => [#<Date: 1965-04-14 ((2438865j,0s,0n),+0s,2299161j)>]

(1..).to_a # RangeE...

Enumerable#to_a(*args) -> [object] (3014.0)

全ての要素を含む配列を返します。

...@param args each の呼び出し時に引数として渡されます。

//emlist[例][ruby]{
(1..7).to_a #=> [1, 2, 3, 4, 5, 6, 7]
{ 'a'=>1, 'b'=>2, 'c'=>3 }.to_a #=> [["a", 1], ["b", 2], ["c", 3]]

require
'prime'
Prime.entries 10 #=> [2, 3, 5, 7]
//}...

Range#to_a -> Array (3008.0)

self を配列に変換します。

...y]{
p (5..0).to_a # => []
p (0..3).to_a # => [0, 1, 2, 3]
p ('a'..'c').to_a # => ["a", "b", "c"]
p (:a..:d).to_a # => [:a, :b, :c, :d]

require
'date'
p (Date.new(1965, 4, 14) .. Date.new(1965, 4, 14)).to_a # => [#<Date: 1965-04-14 ((2438865j,0s,0n),+0s,2299161j)>]

(1..).to_a # RangeE...

絞り込み条件を変える