るりまサーチ (Ruby 2.3.0)

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

別のキーワード

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

クラス

キーワード

検索結果

IO#stat -> File::Stat (78718.0)

ファイルのステータスを含む File::Stat オブジェクトを生成して 返します。

ファイルのステータスを含む File::Stat オブジェクトを生成して
返します。

@raise Errno::EXXX ステータスの読み込みに失敗した場合に発生します。

@raise IOError 既に close されていた場合に発生します。

//emlist[例][ruby]{
IO.write("testfile", "This is line one\nThis is line two\n")
File.open("testfile") do |f|
s = f.stat
"%o" % s.mode # => "100644"
s.blksize ...

File::Stat#grpowned? -> bool (33082.0)

グループIDが実効グループIDと等しい時に真を返します。

グループIDが実効グループIDと等しい時に真を返します。

補助グループIDは考慮されません。

//emlist[][ruby]{
printf "%s %s\n", $:[0], File::Stat.new($:[0]).grpowned?
#例
#=> /usr/local/lib/site_ruby/1.8 false
printf "%s %s\n", $0, File::Stat.new($0).grpowned?
#例
#=> filestat.rb true
//}

File::Stat#owned? -> bool (33046.0)

自分のものである時に真を返します。

自分のものである時に真を返します。

//emlist[][ruby]{
printf "%s %s\n", $:[0], File::Stat.new($:[0]).owned?
#例
#=> /usr/local/lib/site_ruby/1.8 false
//}

Enumerator::Lazy#chunk(initial_state) {|elt, state| ... } -> Enumerator::Lazy (24646.0)

Enumerable#chunk と同じですが、配列ではなく Enumerator::Lazy を返します。

Enumerable#chunk と同じですが、配列ではなく Enumerator::Lazy を返します。

//emlist[例][ruby]{
1.step.lazy.chunk{ |n| n % 3 == 0 }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x007f8bf18118f0>:each>>

1.step.lazy.chunk{ |n| n % 3 == 0 }.take(5).force
# => [[false, [1, 2]], [true, [3]], [false, [4, 5...

Enumerator::Lazy#slice_before(initial_state) {|elt, state| bool } -> Enumerator::Lazy (24628.0)

Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。

Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。

//emlist[例][ruby]{
1.step.lazy.slice_before { |e| e.even? }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x00007f9f31844ce8>:each>>

1.step.lazy.slice_before { |e| e % 3 == 0 }.take(5).force
# => [[1, 2], [3, 4, 5], [6...

絞り込み条件を変える