50件ヒット
[1-50件を表示]
(0.034秒)
種類
- インスタンスメソッド (26)
- クラス (12)
- 文書 (12)
ライブラリ
- ビルトイン (26)
-
rexml
/ document (12)
クラス
-
ARGF
. class (12) - Method (7)
- Proc (7)
キーワード
- Transitive (12)
-
ruby 1
. 6 feature (12) -
to
_ io (12)
検索結果
先頭5件
-
Method
# >>(callable) -> Proc (18124.0) -
self と引数を合成した Proc を返します。
...d(:f) >> method(:g)).call(3) # => 18
//}
//emlist[call を定義したオブジェクトを渡す例][ruby]{
class WordScanner
def self.call(str)
str.scan(/\w+/)
end
end
File.write('testfile', <<~TEXT)
Hello, World!
Hello, Ruby!
TEXT
pipeline = File.method(:read) >> WordScanner >> met......hod(:pp)
pipeline.call('testfile') # => ["Hello", "World", "Hello", "Ruby"]
//}
@see Proc#<<, Proc#>>... -
Proc
# >>(callable) -> Proc (18124.0) -
self と引数を合成した Proc を返します。
...(f >> g).call(3) # => 18
//}
//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 { |fname| File.read(fname) } >> WordScanner >>......method(:p)
pipeline.call('testfile') # => ["Hello", "World", "Hello", "Ruby"]
//}
@see Method#<<, Method#>>... -
REXML
:: Formatters :: Transitive (60.0) -
XMLドキュメントをテキストの内容を変えずに 多少の整形を加えて出力するクラスです。
...transitive_formatter.write(doc, output)
output.string
# => "<root\n><children\n >\n<grandchildren foo='bar'\n />\n</children\n ></root\n>\n"
print output.string
# >> <root
# >> ><children
# >> >
# >> <grandchildren foo='bar'
# >> />
# >> </children
# >> ></root
# >> >
output = StringIO.......new
transitive_formatter.write(REXML::XPath.first(doc, "/root/children"), output)
output.string
# => "<children\n>\n<grandchildren foo='bar'\n />\n</children\n>"
//}... -
ruby 1
. 6 feature (30.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...Fixnum#>>, <<
負の数に対して右シフトすると 0 になることがありました。
((<ruby-bugs-ja:PR#247>))
負の数を引数にした左シフト(つまり右シフト)も同様におかしな挙動をして
いました。((<ruby-bugs-ja:PR#248>))
p(-1 >> 31)......イプの dup を close_write するとエラーになっていました。
((<ruby-dev:17155>))
open("|-","r+") {|f|
if f
f.dup.close_write
else
sleep 1
end
}
=> ruby 1.6.7 (2002-03-01) [i586-linux]
-:3:in `close_write': closing non-duplex I......2002-03-01) [i586-linux]
"\302\200"
[0]
=> ruby 1.6.7 (2002-05-04) [i586-linux]
"\302\200"
[128]
: 2002-04-11: IO#write
ソケットやパイプに対する EPIPE の検出に失敗することがありました。
((<ruby-dev:16849>))
: 2002-04-11: ((<"cgi/se... -
ARGF
. class # to _ io -> IO (12.0) -
ARGFが現在開いているファイルのFile、またはIOオブジェクトを 返します。
...ARGFが現在開いているファイルのFile、またはIOオブジェクトを
返します。
ARGF.to_io # => #<File:glark.txt>
ARGF.to_io # => #<IO:<STDIN>>
@see ARGF.class#file, ARGF.class#to_write_io...