るりまサーチ

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

別のキーワード

  1. _builtin to_a
  2. matrix to_a
  3. to_a
  4. dbm to_a
  5. argf.class to_a

検索結果

<< 1 2 > >>

JSON::State#indent=(string) (27306.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=(indent) (21424.0)

サマリを表示する時のインデントを文字列で指定します。

...@param indent サマリを表示する時に使われるインデントを文字列で指定します。

//emlist[例][ruby]{
require "optparse"

opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.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, --update\n", " -h, --help\n"]
//}...

OptionParser#summarize(to = [], width = self.summary_width, max = width - 1, indent= self.summary_indent) -> () (15520.0)

サマリを指定された to へと加えていきます。

...せん。

@param to サマリを出力するオブジェクトを指定します。to には << メソッドが定義されいる必要があります。

@param width サマリの幅を整数で指定します。

@param max サマリの最大幅を整数で指定します。

@param indent サマ...
...す。

//emlist[例][ruby]{
require "optparse"

opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end

opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summarize(["description\n"], 10, 8...
..., " ")
# => ["description\n", " -i\n", " --init\n", " -u\n", " --update\n", " -h\n", " --help\n"]
//}...

OptionParser#summarize(to = [], width = self.summary_width, max = width - 1, indent= self.summary_indent) {|line| ... } -> () (15520.0)

サマリを指定された to へと加えていきます。

...せん。

@param to サマリを出力するオブジェクトを指定します。to には << メソッドが定義されいる必要があります。

@param width サマリの幅を整数で指定します。

@param max サマリの最大幅を整数で指定します。

@param indent サマ...
...す。

//emlist[例][ruby]{
require "optparse"

opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end

opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summarize(["description\n"], 10, 8...
..., " ")
# => ["description\n", " -i\n", " --init\n", " -u\n", " --update\n", " -h\n", " --help\n"]
//}...

OptionParser#summary_indent -> String (15324.0)

サマリを表示する時のインデントを文字列で返します。

...list[例][ruby]{
require "optparse"

opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end

opts.summary_indent # => " "
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summar...
...y_indent = " "
opts.summary_indent # => " "
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
//}...

絞り込み条件を変える

REXML::AttlistDecl#write(out, indent = -1) -> () (9101.0)

self を out に出力します。

...self を out に出力します。

@param out 出力先の IO オブジェクト
@param indent インデント数(無視されます)...

REXML::Attribute#write(output, indent = -1) -> object (9101.0)

output に self の情報を name='value' という形式で書き込みます。

...output に self の情報を name='value' という形式で書き込みます。

output が返ります。

@param output 書き込み先の IO オブジェクト
@param indent インデントレベル、ここでは無視される...

REXML::NotationDecl#write(output, indent = -1) (9101.0)

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

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

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

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

REXML::DocType#write(output, indent = 0, transitive = false, ie_hack = false) -> () (6301.0)

output に DTD を出力します。

...ドは deprecated です。REXML::Formatter で
出力してください。

@param output 出力先の IO オブジェクト
@param indent インデントの深さ。指定しないでください。
@param transitive 無視されます。指定しないでください。
@param ie_hack 無視さ...
...ist[][ruby]{
require 'rexml/document'

doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT book (comment)>
<!ELEMENT comment (#PCDATA)>
<!ATTLIST book
a
uthor CDATA #REQUIRED
title CDATA #REQUIRED
publisher CDATA "foobar publisher">
<!ENTITY p "fooba...
...r publisher">
<!ENTITY % q "quzz">
]>
EOS

doctype.write(STDOUT)
# =>
# <!DOCTYPE books [
# <!ELEMENT book (comment)>
# ....
//}...

REXML::Document#write(output = $stdout, indent = -1, transitive = false, ie_hack = false, encoding=nil) -> () (6301.0)

output に XML 文書を出力します。

...cument#add で
追加しない限り)
それをしない、ということである。XML-RPCのような利用法では
ネットワークバンドを少しでも節約する必要があるためである。

2.0.0以降ではキーワード引数による引数指定が可能です。

@param outp...
...ut 出力先(IO のように << で書き込めるオブジェクト)
@param indent インデントのスペースの数(-1 だとインデントしない)
@param transitive XMLではインデントのスペースでDOMが変化してしまう場合がある。
これに真を渡すと、XML...
...のDOMに余計な要素が加わらないように
空白の出力を適当に抑制するようになる
@param ie_hack IEはバージョンによってはXMLをちゃんと解釈できないので、
それに対応したXMLを出力するかどうかを真偽値で指定する...

絞り込み条件を変える

<< 1 2 > >>