るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.068秒)
トップページ > バージョン:2.6.0[x] > クエリ:Object[x] > クエリ:OBJECT[x] > クエリ:Method[x] > クエリ:method[x] > クエリ:def_class[x]

別のキーワード

  1. irb/input-method gets
  2. _builtin define_method
  3. irb/input-method new
  4. irb/input-method encoding
  5. irb/input-method readable_atfer_eof?

ライブラリ

クラス

検索結果

ERB#def_class(superklass=Object, methodname='erb') -> Class (55528.0)

変換した Ruby スクリプトをメソッドとして定義した無名のクラスを返します。

変換した Ruby スクリプトをメソッドとして定義した無名のクラスを返します。


@param superklass 無名クラスのスーパークラス

@param methodname メソッド名

//emlist[例][ruby]{
require 'erb'

class MyClass_
def initialize(arg1, arg2)
@arg1 = arg1; @arg2 = arg2
end
end
filename = 'example.rhtml' # @arg1 と @arg2 が使われている example.rhtml

erb = ERB.n...