100件ヒット
[1-100件を表示]
(0.031秒)
別のキーワード
種類
- インスタンスメソッド (72)
- 特異メソッド (24)
- ライブラリ (4)
ライブラリ
- json (12)
- optparse (72)
-
rexml
/ document (12)
クラス
-
JSON
:: State (12) - OptionParser (72)
-
REXML
:: DocType (12)
キーワード
- new (24)
- pp (4)
- summarize (24)
-
summary
_ indent (12) -
summary
_ indent= (12) - write (12)
検索結果
先頭5件
- JSON
:: State # indent=(string) - OptionParser
# summary _ indent=(indent) - 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| . . . } -> () - pp
-
JSON
:: State # indent=(string) (18112.0) -
インデントに使用する文字列をセットします。
...指定します。
//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", key... -
OptionParser
# summary _ indent=(indent) (6112.0) -
サマリを表示する時のインデントを文字列で指定します。
...y]{
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 = "... -
OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) -> () (108.0) -
サマリを指定された to へと加えていきます。
...マリの最大幅を整数で指定します。
@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... -
OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) {|line| . . . } -> () (108.0) -
サマリを指定された to へと加えていきます。
...マリの最大幅を整数で指定します。
@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... -
pp (24.0)
-
オブジェクトなどを見やすく出力するためのライブラリです。
...オブジェクトなどを見やすく出力するためのライブラリです。
このライブラリを require すると Kernel.#pp が定義されます。
Kernel.#p のかわりに Kernel.#pp を使うことにより、
適切にインデントと改行された分かりやすい出力を......tyPrint::Text:0x81a0a7c @tail=0, @width=1, @text=",">, #<PrettyPrint::Break
able:0x81a0a2c @group=2, @gensace=#<Proc:0x81a0cc0>, @newline="\n", @indent=1, @
tail=2, @sep=" ", @width=1>, #<PrettyPrint::Group:0x81a09c8 @group=2, @tail=1, @
buf=[#<PrettyPrint::Text:0x81a0950 @tail=1, @width=1, @t......ail=0, @text=",", @width=1>,
#<PrettyPrint::Breakable:0x40d0516
@genspace=#<Proc:0x40d0656>,
@group=2,
@indent=1,
@newline="\n",
@sep=" ",
@tail=2,
@width=1>,
#<PrettyPrint::Group:0x40d04e4
@b... -
OptionParser
# summary _ indent -> String (12.0) -
サマリを表示する時のインデントを文字列で返します。
...y]{
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 = "... -
OptionParser
. new(banner = nil , width = 32 , indent = & # 39; & # 39; * 4) -> OptionParser (8.0) -
OptionParser オブジェクトを生成して返します。
...オブジェクトを引数としてブロックを評
価します。つまり、以下のような書き方が可能です。
//emlist[][ruby]{
require 'optparse'
OptionParser.new do |opt|
opt.on('-a') {|v| p v }
opt.on('-b') {|v| p v }
opt.parse!(ARGV)
end
//}
@param banner ヘルプ(... -
OptionParser
. new(banner = nil , width = 32 , indent = & # 39; & # 39; * 4) {|opt| . . . } -> OptionParser (8.0) -
OptionParser オブジェクトを生成して返します。
...オブジェクトを引数としてブロックを評
価します。つまり、以下のような書き方が可能です。
//emlist[][ruby]{
require 'optparse'
OptionParser.new do |opt|
opt.on('-a') {|v| p v }
opt.on('-b') {|v| p v }
opt.parse!(ARGV)
end
//}
@param banner ヘルプ(... -
REXML
:: DocType # write(output , indent = 0 , transitive = false , ie _ hack = false) -> () (7.0) -
output に DTD を出力します。
...でください。
//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 publ...