55件ヒット
[1-55件を表示]
(0.144秒)
別のキーワード
ライブラリ
- ビルトイン (9)
- optparse (22)
-
rexml
/ document (22) - thread (2)
クラス
- OptionParser (22)
-
REXML
:: Element (22) -
Thread
:: SizedQueue (11)
キーワード
-
each
_ element _ with _ attribute (11) -
each
_ element _ with _ text (11) - summarize (22)
検索結果
先頭5件
- Thread
:: SizedQueue # max=(n) - OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) -> () - OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) {|line| . . . } -> () - REXML
:: Element # each _ element _ with _ attribute(key , value = nil , max = 0 , name = nil) {|element| . . . } -> () - REXML
:: Element # each _ element _ with _ text(text = nil , max = 0 , name = nil) {|element| . . . } -> ()
-
Thread
:: SizedQueue # max=(n) (21118.0) -
キューの最大サイズを設定します。
...キューの最大サイズを設定します。
@param n キューの最大サイズを指定します。
//emlist[例][ruby]{
require 'thread'
q = SizedQueue.new(4)
q.max # => 4
q.max = 5
q.max # => 5
//}......キューの最大サイズを設定します。
@param n キューの最大サイズを指定します。
//emlist[例][ruby]{
q = SizedQueue.new(4)
q.max # => 4
q.max = 5
q.max # => 5
//}... -
OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) -> () (6150.0) -
サマリを指定された to へと加えていきます。
...せん。
@param to サマリを出力するオブジェクトを指定します。to には << メソッドが定義されいる必要があります。
@param width サマリの幅を整数で指定します。
@param max サマリの最大幅を整数で指定します。
@param indent サマ......す。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summarize(["description\n"], 10, 8......, " ")
# => ["description\n", " -i\n", " --init\n", " -u\n", " --update\n", " -h\n", " --help\n"]
//}... -
OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) {|line| . . . } -> () (6150.0) -
サマリを指定された to へと加えていきます。
...せん。
@param to サマリを出力するオブジェクトを指定します。to には << メソッドが定義されいる必要があります。
@param width サマリの幅を整数で指定します。
@param max サマリの最大幅を整数で指定します。
@param indent サマ......す。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summarize(["description\n"], 10, 8......, " ")
# => ["description\n", " -i\n", " --init\n", " -u\n", " --update\n", " -h\n", " --help\n"]
//}... -
REXML
:: Element # each _ element _ with _ attribute(key , value = nil , max = 0 , name = nil) {|element| . . . } -> () (6131.0) -
特定の属性を持つすべての子要素を引数としてブロックを呼び出します。
...ません)。
@param key 属性名(文字列)
@param value 属性値(文字列)
@param max ブロック呼出の対象とする子要素の最大個数
@param name xpath文字列
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a><b id='1'/><c id='2'/><d id='1'/><e/></a>")
do......ent_with_attribute('id'){|e| p e }
# >> <b id='1'/>
# >> <c id='2'/>
# >> <d id='1'/>
doc.root.each_element_with_attribute('id', '1'){|e| p e }
# >> <b id='1'/>
# >> <d id='1'/>
doc.root.each_element_with_attribute('id', '1', 1){|e| p e }
# >> <b id='1'/>
doc.root.each_element_with_attribute('id', '......1', 0, 'd'){|e| p e }
# >> <d id='1'/>
//}... -
REXML
:: Element # each _ element _ with _ text(text = nil , max = 0 , name = nil) {|element| . . . } -> () (6125.0) -
テキストを子ノードとして 持つすべての子要素を引数としてブロックを呼び出します。
...せん)。
@param text テキストの中身(文字列)
@param max ブロック呼出の対象とする子要素の最大個数
@param name xpath文字列
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new '<a><b>b</b><c>b</c><d>d</d><e/></a>'
doc.root.each_element_with_text {|e|......p e}
# >> <b> ... </>
# >> <c> ... </>
# >> <d> ... </>
doc.root.each_element_with_text('b'){|e|p e}
# >> <b> ... </>
# >> <c> ... </>
doc.root.each_element_with_text('b', 1){|e|p e}
# >> <b> ... </>
doc.root.each_element_with_text(nil, 0, 'd'){|e|p e}
# >> <d> ... </>
//}...