るりまサーチ (Ruby 2.5.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.084秒)
トップページ > クエリ:l[x] > バージョン:2.5.0[x] > クエリ:string[x] > クエリ:puts[x] > クエリ:result[x]

別のキーワード

  1. string []=
  2. string slice!
  3. string slice
  4. string []
  5. string gsub!

ライブラリ

クラス

モジュール

検索結果

ERB#result(b=TOPLEVEL_BINDING) -> String (72961.0)

ERB を b の binding で実行し、結果の文字列を返します。

ERB を b の binding で実行し、結果の文字列を返します。

@param b eRubyスクリプトが実行されるときのbinding

//emlist[例][ruby]{
require 'erb'
erb = ERB.new("test <%= test1 %>\ntest <%= test2 %>\n")
test1 = "foo"
test2 = "bar"
puts erb.result
# test foo
# test bar
//}

@see ERB#result_with_hash

GC::Profiler.result -> String (72943.0)

GC のプロファイル情報をフォーマットし、文字列として返します。

GC のプロファイル情報をフォーマットし、文字列として返します。

プロファイル情報は、GC の発生ごとに集計します。
以下は、5 回 GC が発生した場合の実行例です。

$ ruby -e "GC::Profiler.enable; a = Array.new(100000){ 'aa' }; puts GC::Profiler.result"
GC 5 invokes.
Index Invoke Time(sec) Use Size(byte) Total Size(byte) Total Object ...

Object#===(other) -> bool (463.0)

case 式で使用されるメソッドです。d:spec/control#case も参照してください。

case 式で使用されるメソッドです。d:spec/control#case も参照してください。

このメソッドは case 式での振る舞いを考慮して、
各クラスの性質に合わせて再定義すべきです。

デフォルトでは内部で Object#== を呼び出します。

when 節の式をレシーバーとして === を呼び出すことに注意してください。

また Enumerable#grep でも使用されます。

@param other 比較するオブジェクトです。

//emlist[][ruby]{
age = 12
# (0..2).===(12), (3..6).===(12), ... が実行...