るりまサーチ

最速Rubyリファレンスマニュアル検索!
144件ヒット [101-144件を表示] (0.095秒)
トップページ > 種類:インスタンスメソッド[x] > クエリ:@[x] > クエリ:basic[x] > クエリ:param[x] > クラス:BasicObject[x]

別のキーワード

  1. readline basic_quote_characters
  2. readline basic_quote_characters=
  3. readline basic_word_break_characters
  4. readline basic_word_break_characters=
  5. openssl basic

ライブラリ

検索結果

<< < 1 2 >>

BasicObject#equal?(other) -> bool (3026.0)

オブジェクトが other と同一であれば真を、さもなくば偽を返します。

...
ただし、 BasicObject の位置づけ上、どうしても再定義が必要な用途もあるでしょう。
再定義する際には自分が何をしているのかよく理解してから実行してください。

@
param other 比較対象となるオブジェクト
@
return other が se...
...さもなくば偽

//emlist[例][ruby]{
original = "a"
copied = original.dup
substituted = original

original == copied #=> true
original == substituted #=> true
original.equal? copied #=> false
original.equal? substituted #=> true
//}

@
see Object#equal?, Object#==, Object#eql?...

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

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

...ます。

@
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#m...
...ethod_added,BasicObject#singleton_method_removed,BasicObject#singleton_method_undefined...

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

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

...ンタプリタから呼び出されます。

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

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

//emlist[例][ruby]{
class Foo
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_method_undefined...

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

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

...プリタから呼び出されます。

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

@
param name 未定義にされたメソッド名が Symbol で渡されます。

//emlist[例][ruby]{
class Foo
def singleton_method_undefined(name)...
...foo
end
def obj.bar
end

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

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

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