るりまサーチ

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

別のキーワード

  1. openssl new
  2. _builtin new
  3. rexml/document new
  4. resolv new
  5. socket new

ライブラリ

クラス

キーワード

検索結果

JSON::State#indent=(string) (18112.0)

インデントに使用する文字列をセットします。

.../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_st...

OptionParser.new(banner = nil, width = 32, indent = ' ' * 4) -> OptionParser (18110.0)

OptionParser オブジェクトを生成して返します。

...してブロックを評
価します。つまり、以下のような書き方が可能です。

//emlist[][ruby]{
require 'optparse'
OptionParser.new do |opt|

opt.on('-a') {|v| p v }
opt.on('-b') {|v| p v }

opt.parse!(ARGV)
end
//}

@param banner ヘルプ(サマリ)の最初の部分に...

OptionParser.new(banner = nil, width = 32, indent = ' ' * 4) {|opt| ...} -> OptionParser (18110.0)

OptionParser オブジェクトを生成して返します。

...してブロックを評
価します。つまり、以下のような書き方が可能です。

//emlist[][ruby]{
require 'optparse'
OptionParser.new do |opt|

opt.on('-a') {|v| p v }
opt.on('-b') {|v| p v }

opt.parse!(ARGV)
end
//}

@param banner ヘルプ(サマリ)の最初の部分に...

OptionParser#summary_indent=(indent) (6112.0)

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

...e"

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.s...

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

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

...ます。

@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", "...

絞り込み条件を変える

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

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

...ます。

@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", "...

OptionParser#summary_indent -> String (12.0)

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

...e"

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_inde...

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

output に DTD を出力します。

...い。
@param ie_hack 無視されます。指定しないでください。

//emlist[][ruby]{
require 'rexml/document'

doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT book (comment)>
<!ELEMENT comment (#PCDATA)>
<!ATTLIST book
author CDATA #REQUIRED
ti...