るりまサーチ

最速Rubyリファレンスマニュアル検索!
244件ヒット [1-100件を表示] (0.029秒)

別のキーワード

  1. kernel require
  2. getoptlong require_order
  3. rubygems/custom_require require
  4. irb/ext/use-loader irb_require
  5. require execute

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 3 > >>

JSON::State#indent -> String (18119.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\"}"
//}...

OptionParser#summary_indent=(indent) (6232.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"]
//}...

JSON::State#indent=(string) (6125.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", key...

OptionParser#summary_indent -> String (6125.0)

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

...by]{
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) -> () (216.0)

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

...整数で指定します。

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

@param indent サマリのインデントを文字列で指定します。

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

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

絞り込み条件を変える

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

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

...整数で指定します。

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

@param indent サマリのインデントを文字列で指定します。

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

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

OptionParser.new(banner = nil, width = 32, indent = &#39; &#39; * 4) -> OptionParser (114.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 ヘルプ(...
...サマリ)の最初の部分に表示される、アプリケーションの説明などを文字列で与えます。

@param width サマリの幅を整数で与えます。

@param indent サマリのインデントを文字列で与えます。...

OptionParser.new(banner = nil, width = 32, indent = &#39; &#39; * 4) {|opt| ...} -> OptionParser (114.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 ヘルプ(...
...サマリ)の最初の部分に表示される、アプリケーションの説明などを文字列で与えます。

@param width サマリの幅を整数で与えます。

@param indent サマリのインデントを文字列で与えます。...

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

output に DTD を出力します。

...IO オブジェクト
@param indent インデントの深さ。指定しないでください。
@param transitive 無視されます。指定しないでください。
@param ie_hack 無視されます。指定しないでください。

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

doctype = REXM...
...new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT book (comment)>
<!ELEMENT comment (#PCDATA)>
<!ATTLIST book
author CDATA #REQUIRED
title CDATA #REQUIRED
publisher CDATA "foobar publisher">
<!ENTITY p "foobar publisher">
<!ENTITY % q "quzz">
]>
EOS

doctype.write(STDOUT)...
<< 1 2 3 > >>