108件ヒット
[1-100件を表示]
(0.033秒)
別のキーワード
種類
- インスタンスメソッド (72)
- 特異メソッド (24)
- ライブラリ (12)
ライブラリ
- json (12)
- optparse (72)
-
rexml
/ document (12)
クラス
-
JSON
:: State (12) - OptionParser (72)
-
REXML
:: DocType (12)
キーワード
- new (24)
- pp (12)
- 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",... -
OptionParser
# summary _ indent=(indent) (6112.0) -
サマリを表示する時のインデントを文字列で指定します。
...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 =... -
OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) -> () (108.0) -
サマリを指定された to へと加えていきます。
...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")
e... -
OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) {|line| . . . } -> () (108.0) -
サマリを指定された to へと加えていきます。
...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")
e... -
pp (18.0)
-
オブジェクトなどを見やすく出力するためのライブラリです。
...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......れているものは
PP のメソッドでもあります。
以下は Hash の pretty printing のカスタマイズの例です。
//emlist[][ruby]{
require 'pp'
class Hash
def pretty_print(q)
q.group(2, "<hash>") do
q.breakable
first = true
self.each{|k, v|
unl......れているものは
PP のメソッドでもあります。
以下は Hash の pretty printing のカスタマイズの例です。
//emlist[][ruby]{
class Hash
def pretty_print(q)
q.group(2, "<hash>") do
q.breakable
first = true
self.each{|k, v|
unless first... -
OptionParser
# summary _ indent -> String (12.0) -
サマリを表示する時のインデントを文字列で返します。
...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 =... -
OptionParser
. new(banner = nil , width = 32 , indent = & # 39; & # 39; * 4) -> OptionParser (8.0) -
OptionParser オブジェクトを生成して返します。
...nParser オブジェクトを引数としてブロックを評
価します。つまり、以下のような書き方が可能です。
//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 オブジェクトを生成して返します。
...nParser オブジェクトを引数としてブロックを評
価します。つまり、以下のような書き方が可能です。
//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 を出力します。
...transitive 無視されます。指定しないでください。
@param ie_hack 無視されます。指定しないでください。
//emlist[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT book (comment)>
<!ELEMENT comment (#PCDATA)>
<...