るりまサーチ

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

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. ipaddr to_i
  5. csv to_i

検索結果

<< 1 2 3 > >>

RDoc::Options#formatter -> nil (21201.0)

使用されていません。常に nil を返します。

...使用されていません。常に nil を返します。...

Logger#formatter -> String (18237.0)

ログを出力する際に使用するフォーマッターを取得します。

...ity, time, program name, message) を受けとります。

//emlist[例][ruby]{
require 'logger'

logger = Logger.new(STDOUT)
logger.formatter # => nil
logger.info("test")
# => I, [2019-05-09T22:13:56.509159 #13912] INFO -- : test

ltsv_formatter = proc { |severity, timestamp, progname, msg|
"ti...
...me:#{timestamp}\tlevel:#{severity}\tprogname:#{progname}\tmessage:#{msg}\n"
}
logger.formatter = ltsv_formatter
logger.formatter # => #<Proc:0x00007fa3048b8e00@/path/to/file:8>
logger.info("MyApp") { "test" }

# => time:2019-05-09 22:13:56 +0900 level:INFO progname:MyApp message:test
//}...

Logger::Formatter#datetime_format=(format) (9130.0)

ログの日時フォーマットをセットします。

...フォーマット文字列。Time#strftime で使用するフォーマット文字列と
同じものを使用できます。

//emlist[例][ruby]{
require 'logger'

formatter
= Logger::Formatter.new
formatter
.datetime_format # => nil
formatter
.datetime_format = '%Y-%m-%d %H:%M:%S' #...
...=> "%Y-%m-%d %H:%M:%S"
formatter.datetime_format # => "%Y-%m-%d %H:%M:%S"
//}

@see Time#strftime...

REXML::ExternalEntity#write(output, indent) -> () (9106.0)

output へ self を文字列化して出力します。

...output へ self を文字列化して出力します。

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

@param output 出力先の IO オブジェクト
@param indent インデントの大きさ。無視されます。...

RDoc::Options#formatter=(val) (9101.0)

使用されていません。

使用されていません。

絞り込み条件を変える

Logger::Formatter#datetime_format -> String (9100.0)

ログの日時フォーマットを取得します。

...ログの日時フォーマットを取得します。


@see Time#strftime...

REXML::Formatters::Default#write(node, output) -> () (9100.0)

XML のノード node を output に出力します。

...XML のノード node を output に出力します。

node には任意のXMLノードを指定できます。

@param node 出力するノード
@param output 出力先(IO など << で出力できるオブジェクト)...

REXML::Formatters::Pretty#width -> Integer (9100.0)

出力のページ幅を返します。

...出力のページ幅を返します。

デフォルトは80です。

@see REXML::Formatters::Pretty#width=...

REXML::Formatters::Pretty#width=(w) (9100.0)

出力のページ幅を設定します。

...出力のページ幅を設定します。

@param w ページ幅の設定値
@see REXML::Formatters::Pretty#width...

REXML::Formatters::Transitive (9018.0)

XMLドキュメントをテキストの内容を変えずに 多少の整形を加えて出力するクラスです。

...

//emlist[][ruby]{
require '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, ou...
...tring
# => "<root\n><children\n >\n<grandchildren foo='bar'\n />\n</children\n ></root\n>\n"
print output.string
# >> <root
# >> ><children
# >> >
# >> <grandchildren foo='bar'
# >> />
# >> </children
# >> ></root
# >> >

output = StringIO.new
transitive_formatter.write(REXML::XPath.fir...
...st(doc, "/root/children"), output)
output.string
# => "<children\n>\n<grandchildren foo='bar'\n />\n</children\n>"
//}...

絞り込み条件を変える

<< 1 2 3 > >>