88件ヒット
[1-88件を表示]
(0.158秒)
別のキーワード
種類
- インスタンスメソッド (66)
- 特異メソッド (22)
ライブラリ
- json (11)
- optparse (66)
-
rexml
/ document (11)
クラス
-
JSON
:: State (11) - OptionParser (66)
-
REXML
:: DocType (11)
キーワード
- new (22)
- summarize (22)
-
summary
_ indent (11) -
summary
_ indent= (11) - write (11)
検索結果
先頭5件
-
JSON
:: State # indent=(string) (24236.0) -
インデントに使用する文字列をセットします。
...string インデントに使用する文字列を指定します。
//emlist[例][ruby]{
require "json"
json_state = JSON::State.new(indent: "\t")
json_state.indent # => "\t"
JSON.generate({key1: "value1", key2: "value2"}, json_state)
# => "{\t\"key1\":\"value1\",\t\"key2\":\"value2\"}"
json_state.......indent = " "
JSON.generate({key1: "value1", key2: "value2"}, json_state)
# => "{ \"key1\":\"value1\", \"key2\":\"value2\"}"
//}... -
OptionParser
# summary _ indent=(indent) (12212.0) -
サマリを表示する時のインデントを文字列で指定します。
...ram 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.summary_indent......# => " "
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summary_indent = " " # => " "
opts.summary_indent # => " "
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
//}... -
OptionParser
# summary _ indent -> String (6112.0) -
サマリを表示する時のインデントを文字列で返します。
...@return サマリを表示する時のインデントを文字列で返します。
//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.summary_indent # => " "
opts.......summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summary_indent = " "
opts.summary_indent # => " "
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
//}... -
REXML
:: DocType # write(output , indent = 0 , transitive = false , ie _ hack = false) -> () (6107.0) -
output に DTD を出力します。
...output に DTD を出力します。
このメソッドは deprecated です。REXML::Formatter で
出力してください。
@param output 出力先の IO オブジェクト
@param indent インデントの深さ。指定しないでください。
@param transitive 無視されます。指定....../emlist[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT book (comment)>
<!ELEMENT comment (#PCDATA)>
<!ATTLIST book
author CDATA #REQUIRED
title CDATA #REQUIRED
publisher CDATA "foobar publisher">
<!ENTITY p "f......oobar publisher">
<!ENTITY % q "quzz">
]>
EOS
doctype.write(STDOUT)
# =>
# <!DOCTYPE books [
# <!ELEMENT book (comment)>
# ....
//}... -
OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) -> () (3208.0) -
サマリを指定された to へと加えていきます。
...サマリを指定された to へと加えていきます。
ブロックが与えられた場合、サマリの各行を引数としてブロックを評価します。
この場合、ブロックの中で明示的に to へと加えていかない限り、
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... -
OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) {|line| . . . } -> () (3208.0) -
サマリを指定された to へと加えていきます。
...サマリを指定された to へと加えていきます。
ブロックが与えられた場合、サマリの各行を引数としてブロックを評価します。
この場合、ブロックの中で明示的に to へと加えていかない限り、
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... -
OptionParser
. new(banner = nil , width = 32 , indent = & # 39; & # 39; * 4) -> OptionParser (3108.0) -
OptionParser オブジェクトを生成して返します。
...OptionParser オブジェクトを生成して返します。
ブロックが与えられた場合、生成した OptionParser オブジェクトを引数としてブロックを評
価します。つまり、以下のような書き方が可能です。
//emlist[][ruby]{
require 'optparse'
Optio......pt|
opt.on('-a') {|v| p v }
opt.on('-b') {|v| p v }
opt.parse!(ARGV)
end
//}
@param banner ヘルプ(サマリ)の最初の部分に表示される、アプリケーションの説明などを文字列で与えます。
@param width サマリの幅を整数で与えます。
@param indent... -
OptionParser
. new(banner = nil , width = 32 , indent = & # 39; & # 39; * 4) {|opt| . . . } -> OptionParser (3108.0) -
OptionParser オブジェクトを生成して返します。
...OptionParser オブジェクトを生成して返します。
ブロックが与えられた場合、生成した OptionParser オブジェクトを引数としてブロックを評
価します。つまり、以下のような書き方が可能です。
//emlist[][ruby]{
require 'optparse'
Optio......pt|
opt.on('-a') {|v| p v }
opt.on('-b') {|v| p v }
opt.parse!(ARGV)
end
//}
@param banner ヘルプ(サマリ)の最初の部分に表示される、アプリケーションの説明などを文字列で与えます。
@param width サマリの幅を整数で与えます。
@param indent...