るりまサーチ

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

別のキーワード

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

検索結果

Module#method_added(name) -> () (21113.0)

メソッド name が追加された時にインタプリタがこのメソッドを呼び出します。

...ソッドの追加に対するフックには
BasicObject#singleton_method_added
を使います。

@param name 追加されたメソッドの名前が Symbol で渡されます。

//emlist[例][ruby]{
class Foo
def Foo.method_added(name)
puts "method \"#{name}\" was added"
end

def foo...

Shell::CommandProcessor.method_added(id) (21101.0)

@todo このクラスに定義されたメソッドを Shell にも定義するためのフックです。

...@todo
このクラスに定義されたメソッドを Shell にも定義するためのフックです。

@param id メソッド名を指定します。...

BasicObject#singleton_method_added(name) -> object (12219.0)

特異メソッドが追加された時にインタプリタから呼び出されます。

...には
Module#method_addedを使います。

@param name 追加されたメソッド名が Symbol で渡されます。

//emlist[例][ruby]{
class Foo
def singleton_method_added(name)
puts "singleton method \"#{name}\" was added"
end
end

obj = Foo.new
def obj.foo
end

#=> singleton method...
..."foo" was added
//}

@see Module#method_added,BasicObject#singleton_method_removed,BasicObject#singleton_method_undefined...

BasicObject#singleton_method_removed(name) -> object (6106.0)

特異メソッドが Module#remove_method に より削除された時にインタプリタから呼び出されます。

...dule#remove_method に
より削除された時にインタプリタから呼び出されます。

通常のメソッドの削除に対するフックには
Module#method_removedを使います。

@param name 削除されたメソッド名が Symbol で渡されます。

//emlist[例][ruby]{
clas...
...def singleton_method_removed(name)
puts "singleton method \"#{name}\" was removed"
end
end

obj = Foo.new
def obj.foo
end

class << obj
remove_method :foo
end

#=> singleton method "foo" was removed
//}

@see Module#method_removed,BasicObject#singleton_method_added,BasicObject#singleton_met...

BasicObject#singleton_method_undefined(name) -> object (6106.0)

特異メソッドが Module#undef_method または undef により未定義にされた時にインタプリタから呼び出されます。

...が Module#undef_method または
undef により未定義にされた時にインタプリタから呼び出されます。

通常のメソッドの未定義に対するフックには
Module#method_undefined を使います。

@param name 未定義にされたメソッド名が Symbol で渡さ...
...emlist[例][ruby]{
class Foo
def singleton_method_undefined(name)
puts "singleton method \"#{name}\" was undefined"
end
end

obj = Foo.new
def obj.foo
end
def obj.bar
end

class << obj
undef_method :foo
end
obj.instance_eval {undef bar}

#=> singleton method "foo" was undefined
# singlet...
...on method "bar" was undefined
//}

@see Module#method_undefined,BasicObject#singleton_method_added,BasicObject#singleton_method_removed , d:spec/def#undef...

絞り込み条件を変える

Profiler__ (6012.0)

プロファイラの実装です。 Profiler__.start_profile 実行から、Profiler__.stop_profile までの 区間の実行コードのプロファイルを取得します。

...イラの実装です。
Profiler__.start_profile 実行から、Profiler__.stop_profile までの
区間の実行コードのプロファイルを取得します。

以下の使用例を参照してください。

require 'profiler'

Profiler__.start_profile
require 'tk' # この...
...iler__.print_profile(STDOUT)

# =>
% cumulative self self total
time seconds seconds calls ms/call ms/call name
51.64 1.10 1.10 3 366.67 776.67 Kernel.require
17.37 1.47 0.37 1 370.00 370.00 TclTkIp#initial...
...19 514 0.37 0.37 Module#method_added
6.57 1.80 0.14 1 140.00 140.00 Profiler__.start_profile
4.23 1.89 0.09 15 6.00 10.67 Kernel.extend
3.29 1.96 0.07 15 4.67 4.67 Module#extend_object
3.29 2.03...