るりまサーチ

最速Rubyリファレンスマニュアル検索!
100件ヒット [1-100件を表示] (0.031秒)
トップページ > クエリ:require[x] > クエリ:indent=[x]

別のキーワード

  1. kernel require
  2. getoptlong require_order
  3. rubygems/custom_require require
  4. irb/ext/use-loader irb_require
  5. require execute

ライブラリ

クラス

キーワード

検索結果

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...