9件ヒット
[1-9件を表示]
(0.092秒)
種類
- インスタンスメソッド (4)
- 特異メソッド (3)
- クラス (2)
ライブラリ
- prettyprint (2)
-
rexml
/ document (7)
クラス
- PrettyPrint (2)
-
REXML
:: Formatters :: Pretty (5)
検索結果
先頭5件
- REXML
:: Formatters :: Pretty - PrettyPrint
. singleline _ format(output = & # 39;& # 39; , maxwidth = 79 , newline = "\n" , genspace = lambda{|n| & # 39; & # 39; * n}) {|pp| . . . } -> object - 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 - REXML
:: Formatters :: Pretty # compact -> bool
-
REXML
:: Formatters :: Pretty (72073.0) -
XMLドキュメントを(文字列として)見た目良く出力するクラスです。
XMLドキュメントを(文字列として)見た目良く出力するクラスです。
REXML::Formatters::Default と
異なり見た目のためテキストの改行や空白を修正して出力します。
//emlist[][ruby]{
require 'rexml/document'
require 'rexml/formatters/pretty'
doc = REXML::Document.new <<EOS
<root>
<children>
<grandchildren foo='bar'/>
</children>
</root>
EOS
pretty_formatter = REXM... -
PrettyPrint
. singleline _ format(output = & # 39;& # 39; , maxwidth = 79 , newline = "\n" , genspace = lambda{|n| & # 39; & # 39; * n}) {|pp| . . . } -> object (45601.0) -
PrettyPrint オブジェクトを生成し、それを引数としてブロックを実行します。 PrettyPrint.format に似ていますが、改行しません。
PrettyPrint オブジェクトを生成し、それを引数としてブロックを実行します。
PrettyPrint.format に似ていますが、改行しません。
引数 maxwidth, newline と genspace は無視されます。ブロック中の breakable の実行は、
改行せずに text の実行であるかのように扱います。
@param output 出力先を指定します。output は << メソッドを持っていなければなりません。
@param maxwidth 無視されます。
@param newline 無視されます。
@param genspace 無視されます... -
REXML
:: Formatters :: Pretty . new(indentation=2 , ie _ hack=false) -> REXML :: Formatter :: Pretty (27904.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 (27601.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... -
REXML
:: Formatters :: Pretty # compact -> bool (27319.0) -
出力をコンパクトにするかどうかを返します。
出力をコンパクトにするかどうかを返します。
これが真の場合、出力の空白をできる限り削除しようとします。
デフォルト値は false です。
@see REXML::Formatters::Pretty#compact= -
REXML
:: Formatters :: Default (27019.0) -
XMLドキュメントを(文字列として)出力するクラスです。
XMLドキュメントを(文字列として)出力するクラスです。
REXML::Formatters::Pretty と
異なりテキストの改行や空白を修正せずにそのまま出力します。
//emlist[][ruby]{
require 'rexml/document'
require 'rexml/formatters/default'
doc = REXML::Document.new <<EOS
<root>
<children>
<grandchildren/>
</children>
</root>
EOS
default_formatter = REXML::Formatters::... -
REXML
:: Formatters :: Pretty # compact=(c) (27019.0) -
出力をコンパクトにするかどうかを設定します。
出力をコンパクトにするかどうかを設定します。
@param c コンパクトな出力をするかどうかを指定します。
@see REXML::Formatters::Pretty#compact -
REXML
:: Formatters :: Pretty # width -> Integer (27019.0) -
出力のページ幅を返します。
出力のページ幅を返します。
デフォルトは80です。
@see REXML::Formatters::Pretty#width= -
REXML
:: Formatters :: Pretty # width=(w) (27019.0) -
出力のページ幅を設定します。
出力のページ幅を設定します。
@param w ページ幅の設定値
@see REXML::Formatters::Pretty#width