5件ヒット
[1-5件を表示]
(0.031秒)
別のキーワード
クラス
-
Enumerator
:: Lazy (2) -
File
:: Stat (2) - IO (1)
キーワード
- chunk (1)
- grpowned? (1)
- owned? (1)
-
slice
_ before (1)
検索結果
先頭5件
-
IO
# stat -> File :: Stat (54718.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 (9082.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 (9046.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 (646.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 (628.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...