ライブラリ
-
cgi
/ util (1) - pp (2)
- prettyprint (4)
-
rexml
/ document (1)
クラス
- CGI (1)
- PP (2)
- PrettyPrint (4)
-
REXML
:: Formatters :: Pretty (1)
キーワード
- format (1)
- new (3)
-
sharing
_ detection (1) -
sharing
_ detection= (1) -
singleline
_ format (1)
検索結果
先頭5件
- CGI
. pretty(string , shift = " ") -> String - PrettyPrint
. new(output = & # 39;& # 39; , maxwidth = 79 , newline = "\n") -> PrettyPrint - PrettyPrint
. new(output = & # 39;& # 39; , maxwidth = 79 , newline = "\n") {|width| . . . } -> PrettyPrint - REXML
:: Formatters :: Pretty . new(indentation=2 , ie _ hack=false) -> REXML :: Formatter :: Pretty - PrettyPrint
. format(output = & # 39;& # 39; , maxwidth = 79 , newline = "\n" , genspace = lambda{|n| & # 39; & # 39; * n}) {|pp| . . . } -> object
-
CGI
. pretty(string , shift = " ") -> String (54343.0) -
HTML を人間に見やすく整形した文字列を返します。
HTML を人間に見やすく整形した文字列を返します。
@param string HTML を指定します。
@param shift インデントに使用する文字列を指定します。デフォルトは半角空白二つです。
例:
require "cgi"
print CGI.pretty("<HTML><BODY></BODY></HTML>")
# <HTML>
# <BODY>
# </BODY>
# </HTML>
print CGI.pretty("<HT... -
PrettyPrint
. new(output = & # 39;& # 39; , maxwidth = 79 , newline = "\n") -> PrettyPrint (9352.0) -
pretty printing のためのバッファを生成します。 output は出力先です。output は << メソッドを持っていなければなりません。 << メソッドには * PrettyPrint#text の第1引数 obj * PrettyPrint#breakable の第1引数 sep * PrettyPrint.new の第3引数 newline * PrettyPrint.new に与えたブロックを評価した結果 のどれかひとつが引数として与えられます。
pretty printing のためのバッファを生成します。
output は出力先です。output は << メソッドを持っていなければなりません。
<< メソッドには
* PrettyPrint#text の第1引数 obj
* PrettyPrint#breakable の第1引数 sep
* PrettyPrint.new の第3引数 newline
* PrettyPrint.new に与えたブロックを評価した結果
のどれかひとつが引数として与えられます。
ブロックが指定された場合は、空白を生成するために使われます。ブロックは、生成したい空白の幅を表す整数を引数として... -
PrettyPrint
. new(output = & # 39;& # 39; , maxwidth = 79 , newline = "\n") {|width| . . . } -> PrettyPrint (9352.0) -
pretty printing のためのバッファを生成します。 output は出力先です。output は << メソッドを持っていなければなりません。 << メソッドには * PrettyPrint#text の第1引数 obj * PrettyPrint#breakable の第1引数 sep * PrettyPrint.new の第3引数 newline * PrettyPrint.new に与えたブロックを評価した結果 のどれかひとつが引数として与えられます。
pretty printing のためのバッファを生成します。
output は出力先です。output は << メソッドを持っていなければなりません。
<< メソッドには
* PrettyPrint#text の第1引数 obj
* PrettyPrint#breakable の第1引数 sep
* PrettyPrint.new の第3引数 newline
* PrettyPrint.new に与えたブロックを評価した結果
のどれかひとつが引数として与えられます。
ブロックが指定された場合は、空白を生成するために使われます。ブロックは、生成したい空白の幅を表す整数を引数として... -
REXML
:: Formatters :: Pretty . new(indentation=2 , ie _ hack=false) -> REXML :: Formatter :: Pretty (9307.0) -
フォーマッタオブジェクトを生成して返します。
フォーマッタオブジェクトを生成して返します。
このフォーマッタによる出力はテキストの空白や改行を調整し、
適切なインデントを挿入して読みやすいXMLを出力します。
indentation でインデント幅を(空白の数で)指定します。
ie_hack に真を渡すと、空のタグを閉じる前で空白を挿入します。
これは特定のバージョンのIEのXMLパーサのバグを避けるための機能です。
@param indentation 出力のインデント幅
@param ie_hack 空のタグを閉じる所にスペースを入れるかどうか -
PrettyPrint
. format(output = & # 39;& # 39; , maxwidth = 79 , newline = "\n" , genspace = lambda{|n| & # 39; & # 39; * n}) {|pp| . . . } -> object (9004.0) -
PrettyPrint オブジェクトを生成し、それを引数としてブロックを実行します。 与えられた output を返します。
PrettyPrint オブジェクトを生成し、それを引数としてブロックを実行します。
与えられた output を返します。
以下と同じ働きをするもので簡便のために用意されています。
//emlist[][ruby]{
require 'prettyprint'
begin
pp = PrettyPrint.new(output, maxwidth, newline, &genspace)
...
pp.flush
output
end
//}
@param output 出力先を指定します。output は << メソッドを持っていなければなりません。
@param... -
PrettyPrint
. singleline _ format(output = & # 39;& # 39; , maxwidth = 79 , newline = "\n" , genspace = lambda{|n| & # 39; & # 39; * n}) {|pp| . . . } -> object (9004.0) -
PrettyPrint オブジェクトを生成し、それを引数としてブロックを実行します。 PrettyPrint.format に似ていますが、改行しません。
PrettyPrint オブジェクトを生成し、それを引数としてブロックを実行します。
PrettyPrint.format に似ていますが、改行しません。
引数 maxwidth, newline と genspace は無視されます。ブロック中の breakable の実行は、
改行せずに text の実行であるかのように扱います。
@param output 出力先を指定します。output は << メソッドを持っていなければなりません。
@param maxwidth 無視されます。
@param newline 無視されます。
@param genspace 無視されます... -
PP
. sharing _ detection -> bool (52.0) -
共有検出フラグを表すアクセサです。 デフォルトは false です。true である場合、 PP.pp は一度出力したオブジェクトを再び出力する時 Object#pretty_print_cycle を使います。
共有検出フラグを表すアクセサです。
デフォルトは false です。true である場合、
PP.pp は一度出力したオブジェクトを再び出力する時
Object#pretty_print_cycle を使います。
@param boolean 共有検出フラグを true か false で指定します。
//emlist[][ruby]{
require 'pp'
b = [1, 2, 3]
a = [b, b]
pp a #=> [[1, 2, 3], [1, 2, 3]]
PP.sharing_detection = true
pp ... -
PP
. sharing _ detection=(boolean) (52.0) -
共有検出フラグを表すアクセサです。 デフォルトは false です。true である場合、 PP.pp は一度出力したオブジェクトを再び出力する時 Object#pretty_print_cycle を使います。
共有検出フラグを表すアクセサです。
デフォルトは false です。true である場合、
PP.pp は一度出力したオブジェクトを再び出力する時
Object#pretty_print_cycle を使います。
@param boolean 共有検出フラグを true か false で指定します。
//emlist[][ruby]{
require 'pp'
b = [1, 2, 3]
a = [b, b]
pp a #=> [[1, 2, 3], [1, 2, 3]]
PP.sharing_detection = true
pp ...