103件ヒット
[101-103件を表示]
(0.052秒)
クラス
- File (24)
-
File
:: Stat (36) -
Net
:: HTTPGenericRequest (24) - Proc (7)
モジュール
-
Rake
:: TaskManager (12)
キーワード
- << (7)
- blksize (12)
-
body
_ stream (12) -
body
_ stream= (12) - size? (12)
-
synthesize
_ file _ task (12) - truncate (12)
検索結果
-
Proc
# <<(callable) -> Proc (37.0) -
self と引数を合成した Proc を返します。
...//emlist[例][ruby]{
f = proc { |x| x * x }
g = proc { |x| x + x }
# (3 + 3) * (3 + 3)
p (f << g).call(3) # => 36
//}
//emlist[call を定義したオブジェクトを渡す例][ruby]{
class WordScanner
def self.call(str)
str.scan(/\w+/)
end
end
File.write('testfile', <<~TEXT)
Hello,......World!
Hello, Ruby!
TEXT
pipeline = proc { |data| puts "word count: #{data.size}" } << WordScanner << File.method(:read)
pipeline.call('testfile') # => word count: 4
//}
@see Method#<<, Method#>>...