るりまサーチ

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

別のキーワード

  1. openssl p
  2. openssl p=
  3. fileutils mkdir_p
  4. kernel p
  5. kernel $-p

種類

ライブラリ

クラス

キーワード

検索結果

PrettyPrint.format(output = '', maxwidth = 79, newline = "\n", genspace = lambda{|n| ' ' * n}) {|pp| ...} -> object (24302.0)

PrettyPrint オブジェクトを生成し、それを引数としてブロックを実行します。 与えられた output を返します。

...PrettyPrint オブジェクトを生成し、それを引数としてブロックを実行します。
与えられた output を返します。

以下と同じ働きをするもので簡便のために用意されています。

//emlist[][ruby]{
require 'prettyprint'

begin
p
p = PrettyPrint.ne...
...w(output, maxwidth, newline, &genspace)
...
p
p.flush
output
end
//}

@param output 出力先を指定します。output は << メソッドを持っていなければなりません。

@param maxwidth 行の最大幅を指定します。ただし、改行できないものが渡された場...
...合は、
実際の出力幅は maxwidth を越えることがあります。

@param newline 改行に使われます。

@param genspace 空白の生成に使われる Proc オブジェクトを指定します。
生成したい空白の幅を表す整数を引数...

PrettyPrint.singleline_format(output = &#39;&#39;, maxwidth = 79, newline = "\n", genspace = lambda{|n| &#39; &#39; * n}) {|pp| ...} -> object (12318.0)

PrettyPrint オブジェクトを生成し、それを引数としてブロックを実行します。 PrettyPrint.format に似ていますが、改行しません。

...
P
rettyPrint オブジェクトを生成し、それを引数としてブロックを実行します。
P
rettyPrint.format に似ていますが、改行しません。

引数 maxwidth, newline と genspace は無視されます。ブロック中の breakable の実行は、
改行せずに text...
...の実行であるかのように扱います。

@param output 出力先を指定します。output は << メソッドを持っていなければなりません。

@param maxwidth 無視されます。

@param newline 無視されます。

@param genspace 無視されます。...

NEWS for Ruby 3.0.0 (72.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...separated from positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to autosplatting. This now matches the behavior of Pro...
...eturn a frozen copy even if the receiver is unfrozen. 16175
* Kernel#eval when called with two arguments will use `"(eval)"` for `__FILE__` and `1` for `__LINE__` in the evaluated code. 4352
* Kernel#lambda now warns if called without a literal block. 15973
* Kernel.sleep invokes the sch...
...terface [EXPERIMENTAL]
* The memory view interface is a C-API set to exchange a raw memory area, such as a numeric array or a bitmap image, between extension libraries. The extension libraries can share also the metadata of the memory area that consists of the shape, the element format, and so o...