別のキーワード
ライブラリ
- English (33)
- ビルトイン (154)
-
cgi
/ core (11) -
irb
/ output-method (33) -
net
/ telnet (4) - nkf (11)
- prettyprint (55)
-
rexml
/ document (11)
クラス
- CGI (11)
- IO (154)
-
IRB
:: OutputMethod (22) -
IRB
:: StdioOutputMethod (11) -
Net
:: Telnet (4) - PrettyPrint (55)
モジュール
- Kernel (33)
キーワード
-
$ DEFAULT _ OUTPUT (11) -
$ ORS (11) -
$ OUTPUT _ RECORD _ SEPARATOR (11) -
NEWS for Ruby 3
. 0 . 0 (4) - NKF (11)
- Transitive (11)
- format (11)
- new (26)
- popen (154)
- prettyprint (11)
- printn (11)
- rss (11)
-
ruby 1
. 8 . 3 feature (11) -
singleline
_ format (11)
検索結果
先頭5件
-
PrettyPrint
# output -> object (21117.0) -
自身の output を返します。
...自身の output を返します。... -
IRB
:: OutputMethod # print(*objs) (21101.0) -
NotImplementedError が発生します。
NotImplementedError が発生します。
@param objs 任意のオブジェクトを指定します。
@raise NotImplementedError 必ず発生します。 -
IRB
:: StdioOutputMethod # print(*objs) -> nil (21101.0) -
引数を標準出力に出力します。
引数を標準出力に出力します。
@param objs 任意のオブジェクトを指定します。 -
CGI
# print(*strings) (18125.0) -
@todo
...@todo
引数の文字列を標準出力に出力します。
cgi.print は $DEFAULT_OUTPUT.print と等価です。
例:
cgi = CGI.new
cgi.print "This line is a part of content body.\r\n"... -
IRB
:: OutputMethod # printn(*objs) -> nil (9100.0) -
各 obj を self に出力し、最後に改行を出力します。
各 obj を self に出力し、最後に改行を出力します。
@param objs 任意のオブジェクトを指定します。 -
Kernel
$ $ DEFAULT _ OUTPUT -> IO (6131.0) -
$> の別名
...$> の別名
require "English"
dout = $DEFAULT_OUTPUT.dup
$DEFAULT_OUTPUT.reopen("out.txt", "w")
print "foo"
$DEFAULT_OUTPUT.close
$DEFAULT_OUTPUT = dout
p "bar" # => bar
p File.read("out.txt") #=> foo... -
prettyprint (6006.0)
-
pretty printing アルゴリズムのためのライブラリです。
...pretty printing アルゴリズムのためのライブラリです。
=== 使い方
pretty printing アルゴリズムは読みやすいインデントと改行を決定するためのアルゴリズムです。
インデントと改行はユーザによって与えられたツリー構造から......作成する必要があります。
* PrettyPrint.new でバッファを生成します。このとき、バッファの幅と改行文字を指定します。
* PrettyPrint#text を使って、文字列を適宜 挿入します。
* PrettyPrint#group を使って子ノードをつくります......ます。
//emlist[][ruby]{
require 'prettyprint'
p2 = PrettyPrint.new('', 10)
s = 'hello'
p2.text(s)
p2.group(p2.indent + s.size + 1) do
p2.breakable
p2.text('a')
p2.breakable
p2.text('b')
p2.breakable
p2.text('c')
end
p2.flush
puts p2.output
#=>
# hello
# a
# b
# c... -
PrettyPrint
. new(output = & # 39;& # 39; , maxwidth = 79 , newline = "\n") -> PrettyPrint (3246.0) -
pretty printing のためのバッファを生成します。 output は出力先です。output は << メソッドを持っていなければなりません。 << メソッドには * PrettyPrint#text の第1引数 obj * PrettyPrint#breakable の第1引数 sep * PrettyPrint.new の第3引数 newline * PrettyPrint.new に与えたブロックを評価した結果 のどれかひとつが引数として与えられます。
...pretty printing のためのバッファを生成します。
output は出力先です。output は << メソッドを持っていなければなりません。
<< メソッドには
* PrettyPrint#text の第1引数 obj
* PrettyPrint#breakable の第1引数 sep
* PrettyPrint.new の第3引数 n......ewline
* PrettyPrint.new に与えたブロックを評価した結果
のどれかひとつが引数として与えられます。
ブロックが指定された場合は、空白を生成するために使われます。ブロックは、生成したい空白の幅を表す整数を引数とし......ブロックが指定されない場合は、空白を生成するために {|width| ' ' * width} が使われます。
@param output 出力先を指定します。output は << メソッドを持っていなければなりません。
@param maxwidth 行の最大幅を指定します。ただし... -
PrettyPrint
. new(output = & # 39;& # 39; , maxwidth = 79 , newline = "\n") {|width| . . . } -> PrettyPrint (3246.0) -
pretty printing のためのバッファを生成します。 output は出力先です。output は << メソッドを持っていなければなりません。 << メソッドには * PrettyPrint#text の第1引数 obj * PrettyPrint#breakable の第1引数 sep * PrettyPrint.new の第3引数 newline * PrettyPrint.new に与えたブロックを評価した結果 のどれかひとつが引数として与えられます。
...pretty printing のためのバッファを生成します。
output は出力先です。output は << メソッドを持っていなければなりません。
<< メソッドには
* PrettyPrint#text の第1引数 obj
* PrettyPrint#breakable の第1引数 sep
* PrettyPrint.new の第3引数 n......ewline
* PrettyPrint.new に与えたブロックを評価した結果
のどれかひとつが引数として与えられます。
ブロックが指定された場合は、空白を生成するために使われます。ブロックは、生成したい空白の幅を表す整数を引数とし......ブロックが指定されない場合は、空白を生成するために {|width| ' ' * width} が使われます。
@param output 出力先を指定します。output は << メソッドを持っていなければなりません。
@param maxwidth 行の最大幅を指定します。ただし... -
PrettyPrint
. format(output = & # 39;& # 39; , maxwidth = 79 , newline = "\n" , genspace = lambda{|n| & # 39; & # 39; * n}) {|pp| . . . } -> object (3141.0) -
PrettyPrint オブジェクトを生成し、それを引数としてブロックを実行します。 与えられた output を返します。
...rettyPrint オブジェクトを生成し、それを引数としてブロックを実行します。
与えられた output を返します。
以下と同じ働きをするもので簡便のために用意されています。
//emlist[][ruby]{
require 'prettyprint'
begin
pp = PrettyPrint.new......(output, maxwidth, newline, &genspace)
...
pp.flush
output
end
//}
@param output 出力先を指定します。output は << メソッドを持っていなければなりません。
@param maxwidth 行の最大幅を指定します。ただし、改行できないものが渡された場合...