390件ヒット
[201-300件を表示]
(0.028秒)
ライブラリ
- logger (93)
-
rdoc
/ markup (12) -
rdoc
/ markup / formatter (48) -
rexml
/ document (132) -
syslog
/ logger (48)
クラス
- Logger (33)
-
Logger
:: Formatter (48) -
RDoc
:: Markup (12) -
RDoc
:: Markup :: Formatter (36) -
RDoc
:: Options (24) -
REXML
:: Formatters :: Default (24) -
REXML
:: Formatters :: Pretty (60) -
REXML
:: Formatters :: Transitive (12) -
Syslog
:: Logger (24) -
Syslog
:: Logger :: Formatter (12)
キーワード
- Default (12)
- Formatter (36)
-
NEWS for Ruby 2
. 4 . 0 (9) - Pretty (12)
- Transitive (12)
-
add
_ tag (12) - call (24)
- compact (12)
- compact= (12)
- convert (24)
-
datetime
_ format (12) -
datetime
_ format= (12) - formatter= (36)
- logger (12)
- new (57)
-
rdoc
/ markup / formatter (12) - width (12)
- width= (12)
- write (12)
検索結果
先頭5件
-
REXML
:: Formatters :: Transitive . new(indentation=2 , ie _ hack=false) -> REXML :: Formatter :: Transitive (6201.0) -
フォーマッタオブジェクトを生成して返します。
フォーマッタオブジェクトを生成して返します。
このフォーマッタによる出力は基本的にテキストの空白や改行を変化させないと
いう制約のもと、出力を整形します。
indentation でインデント幅を指定できます。
ie_hack に真を渡すと、空のタグを閉じる前で空白を挿入します。
これは特定のバージョンのIEのXMLパーサのバグを避けるための機能です。
@param indentation インデント幅
@param ie_hack 空のタグを閉じる所にスペースを入れるかどうかを指定します -
REXML
:: Formatters :: Default (6030.0) -
XMLドキュメントを(文字列として)出力するクラスです。
...:Formatters::Pretty と
異なりテキストの改行や空白を修正せずにそのまま出力します。
//emlist[][ruby]{
require 'rexml/document'
require 'rexml/formatters/default'
doc = REXML::Document.new <<EOS
<root>
<children>
<grandchildren/>
</children>
</root>
EOS
default_formatt......er = REXML::Formatters::Default.new
output = StringIO.new
default_formatter.write(doc, output)
output.string
# => "<root>\n<children>\n <grandchildren/>\n</children>\n</root>\n"
output = StringIO.new
default_formatter.write(REXML::XPath.first(doc, "/root/children"), output)
output.string
# => "<ch......ildren>\n <grandchildren/>\n</children>"
ie_hack_formatter = REXML::Formatters::Default.new(true)
output = StringIO.new
ie_hack_formatter.write(doc, output)
output.string
# => "<root>\n<children>\n <grandchildren />\n</children>\n</root>\n"
//}... -
REXML
:: Formatters :: Transitive (6018.0) -
XMLドキュメントをテキストの内容を変えずに 多少の整形を加えて出力するクラスです。
...equire 'rexml/document'
require 'rexml/formatters/transitive'
doc = REXML::Document.new <<EOS
<root><children>
<grandchildren foo='bar' />
</children></root>
EOS
transitive_formatter = REXML::Formatters::Transitive.new
output = StringIO.new
transitive_formatter.write(doc, output)
output.string
# =>......>> <root
# >> ><children
# >> >
# >> <grandchildren foo='bar'
# >> />
# >> </children
# >> ></root
# >> >
output = StringIO.new
transitive_formatter.write(REXML::XPath.first(doc, "/root/children"), output)
output.string
# => "<children\n>\n<grandchildren foo='bar'\n />\n</children\n>"
//}... -
REXML
:: Formatters :: Pretty (6012.0) -
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 = REXML::Formatters::Pretty.new
output = StringIO.new
pretty_formatter.write(doc, output)
output.string
# => "<root>\n <children>\n <grandchildren foo='bar'/>\n </children>\n</root>"
# この出力結果は入力のXMLよ... -
Logger
:: Formatter # call(severity , time , progname , msg) -> String (6000.0) -
ログ情報をフォーマットして返します。
ログ情報をフォーマットして返します。
@param severity ログレベル。
@param time 時間。Time クラスのオブジェクト。
@param progname プログラム名
@param msg メッセージ。 -
RDoc
:: Markup :: Formatter # add _ tag(name , start , stop) -> () (6000.0) -
name で登録された規則で取得された文字列を start と stop で囲むように指 定します。
name で登録された規則で取得された文字列を start と stop で囲むように指
定します。
@param name RDoc::Markup::ToHtml などのフォーマッタに識別させる時
の名前を Symbol で指定します。
@param start 開始の記号を文字列で指定します。
@param stop 終了の記号を文字列で指定します。
例:
require 'rdoc/markup/to_html'
# :STRIKE のフォーマットを <strike> 〜 </strike> に指定。
h = RDoc::Markup:... -
RDoc
:: Markup :: Formatter # convert(content) -> () (6000.0) -
content で指定された文字列を変換します。
content で指定された文字列を変換します。
@param content 変換する文字列を指定します。 -
REXML
:: Formatters :: Default # write(node , output) -> () (6000.0) -
XML のノード node を output に出力します。
XML のノード node を output に出力します。
node には任意のXMLノードを指定できます。
@param node 出力するノード
@param output 出力先(IO など << で出力できるオブジェクト) -
REXML
:: Formatters :: Pretty # compact -> bool (6000.0) -
出力をコンパクトにするかどうかを返します。
...出力をコンパクトにするかどうかを返します。
これが真の場合、出力の空白をできる限り削除しようとします。
デフォルト値は false です。
@see REXML::Formatters::Pretty#compact=...