132件ヒット
[1-100件を表示]
(0.100秒)
別のキーワード
ライブラリ
- json (48)
- optparse (12)
- prettyprint (24)
- psych (12)
-
rexml
/ document (36)
クラス
-
JSON
:: State (48) - OptionParser (12)
- PrettyPrint (24)
-
Psych
:: Emitter (12) -
REXML
:: Document (24)
モジュール
-
REXML
:: Node (12)
キーワード
- configure (12)
- group (12)
- indent= (12)
- indentation (12)
- merge (12)
-
summary
_ indent (12) -
to
_ s (12) - write (24)
検索結果
先頭5件
-
JSON
:: State # indent -> String (18214.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\"}"
//}... -
PrettyPrint
# indent -> Integer (18202.0) -
現在のインデントの深さを返します。
現在のインデントの深さを返します。 -
JSON
:: State # indent=(string) (6220.0) -
インデントに使用する文字列をセットします。
...使用する文字列をセットします。
@param 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 -> String (6220.0) -
サマリを表示する時のインデントを文字列で返します。
...s.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, --updat... -
PrettyPrint
# group(indent = 0 , open _ obj = & # 39;& # 39; , close _ obj = & # 39;& # 39; , open _ width = open _ obj . length , close _ width = close _ obj . length) { . . . } -> () (6208.0) -
与えられたブロックを実行します。 ブロック内で自身に追加される文字列やオブジェクトは、1行にまとめて表示しても よい同じグループに属すると仮定されます。
...すると仮定されます。
もう少し詳しく説明します。pretty printing アルゴリズムはインデントと改行を、
ツリー構造を作ることによって決定します。そして、group メソッドは子ノードの作成と
子ノードのインデントの深さの......決定を担当します。
同じノード内で呼ばれた breakable は、改行するならば全て同時に改行します。
@param indent グループのインデントの深さを指定します。
@param open_obj 指定された場合、self.text(open_obj, open_width) がブロック... -
Psych
:: Emitter # indentation -> Integer (6201.0) -
インデントのレベルを返します。
...インデントのレベルを返します。
@see Psych::Emitter#indentation=... -
JSON
:: State # configure(options = {}) -> self (6125.0) -
与えられたハッシュで自身を設定します。
..."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.configure(indent: " ")
json_state.indent # => " "
JSON.generate({key1: "value1", key2: "value... -
JSON
:: State # merge(options = {}) -> self (6125.0) -
与えられたハッシュで自身を設定します。
..."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.configure(indent: " ")
json_state.indent # => " "
JSON.generate({key1: "value1", key2: "value... -
REXML
:: Document # write(output = $ stdout , indent = -1 , transitive = false , ie _ hack = false , encoding=nil) -> () (209.0) -
output に XML 文書を出力します。
...ーワード引数による引数指定が可能です。
@param output 出力先(IO のように << で書き込めるオブジェクト)
@param indent インデントのスペースの数(-1 だとインデントしない)
@param transitive XMLではインデントのスペースでDOMが変化...