るりまサーチ

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

別のキーワード

  1. _builtin to_r
  2. open3 pipeline_r
  3. matrix elements_to_r
  4. bigdecimal to_r
  5. fileutils cp_r

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 3 > >>

JSON::State#indent=(string) (18206.0)

インデントに使用する文字列をセットします。

...に使用する文字列をセットします。

@param string インデントに使用する文字列を指定します。

//emlist[例][ruby]{
r
equire "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) (12206.0)

サマリを表示する時のインデントを文字列で指定します。

...

@param indent サマリを表示する時に使われるインデントを文字列で指定します。

//emlist[例][ruby]{
r
equire "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#summarize(to = [], width = self.summary_width, max = width - 1, indent= self.summary_indent) -> () (6202.0)

サマリを指定された to へと加えていきます。

...せん。

@param to サマリを出力するオブジェクトを指定します。to には << メソッドが定義されいる必要があります。

@param width サマリの幅を整数で指定します。

@param max サマリの最大幅を整数で指定します。

@param indent サマ...
...[ruby]{
r
equire "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, " ")
# => ["descri...

OptionParser#summarize(to = [], width = self.summary_width, max = width - 1, indent= self.summary_indent) {|line| ... } -> () (6202.0)

サマリを指定された to へと加えていきます。

...せん。

@param to サマリを出力するオブジェクトを指定します。to には << メソッドが定義されいる必要があります。

@param width サマリの幅を整数で指定します。

@param max サマリの最大幅を整数で指定します。

@param indent サマ...
...[ruby]{
r
equire "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, " ")
# => ["descri...

OptionParser#summary_indent -> String (6106.0)

サマリを表示する時のインデントを文字列で返します。

...返します。

@return サマリを表示する時のインデントを文字列で返します。

//emlist[例][ruby]{
r
equire "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"]
//}...

絞り込み条件を変える

PrettyPrint#group(indent = 0, open_obj = &#39;&#39;, close_obj = &#39;&#39;, open_width = open_obj.length, close_width = close_obj.length) {...} -> () (6101.0)

与えられたブロックを実行します。 ブロック内で自身に追加される文字列やオブジェクトは、1行にまとめて表示しても よい同じグループに属すると仮定されます。

...。pretty printing アルゴリズムはインデントと改行を、
ツリー構造を作ることによって決定します。そして、group メソッドは子ノードの作成と
子ノードのインデントの深さの決定を担当します。

同じノード内で呼ばれた breaka...
...

@param indent グループのインデントの深さを指定します。

@param open_obj 指定された場合、self.text(open_obj, open_width) がブロックが
実行される前に呼ばれます。開き括弧などを出力するのに使用されます。

@param clos...
...、self.text(close_obj, close_width) がブロックが
実行された後に呼ばれます。閉じ括弧などを出力するのに使用されます。

@param open_width open_obj のカラムを指定します。

@param close_width close_obj のカラムを指定します。...

REXML::AttlistDecl#write(out, indent = -1) -> () (6101.0)

self を out に出力します。

...self を out に出力します。

@param out 出力先の IO オブジェクト
@param indent インデント数(無視されます)...

REXML::Attribute#write(output, indent = -1) -> object (6101.0)

output に self の情報を name='value' という形式で書き込みます。

...output に self の情報を name='value' という形式で書き込みます。

output が返ります。

@param output 書き込み先の IO オブジェクト
@param indent インデントレベル、ここでは無視される...

REXML::DocType#write(output, indent = 0, transitive = false, ie_hack = false) -> () (6101.0)

output に DTD を出力します。

...ソッドは deprecated です。REXML::Formatter
出力してください。

@param output 出力先の IO オブジェクト
@param indent インデントの深さ。指定しないでください。
@param transitive 無視されます。指定しないでください。
@param ie_hack 無...
...[][ruby]{
r
equire '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 "foobar p...
...ublisher">
<!ENTITY % q "quzz">
]>
EOS

doctype.write(STDOUT)
# =>
# <!DOCTYPE books [
# <!ELEMENT book (comment)>
# ....
//}...
<< 1 2 3 > >>