別のキーワード
ライブラリ
- ビルトイン (408)
- delegate (12)
- erb (12)
-
fiddle
/ import (12) - forwardable (48)
- json (12)
-
rdoc
/ context (24) -
rdoc
/ generator / darkfish (12) -
rdoc
/ generator / ri (12) -
rubygems
/ specification (12) - win32ole (36)
クラス
- BasicObject (84)
- Class (24)
- ERB (12)
-
Gem
:: Specification (12) - Object (156)
-
RDoc
:: Context (24) -
RDoc
:: Generator :: Darkfish (12) -
RDoc
:: Generator :: RI (12) -
Thread
:: Backtrace :: Location (48) - WIN32OLE (12)
-
WIN32OLE
_ EVENT (12) -
WIN32OLE
_ TYPE (12)
モジュール
- Enumerable (96)
-
Fiddle
:: Importer (12) - Forwardable (48)
-
JSON
:: Generator :: GeneratorMethods :: Object (12) - Kernel (12)
キーワード
- ! (12)
- != (12)
- == (12)
- DelegateClass (12)
-
_ dump (12) -
absolute
_ path (12) - allocate (12)
-
base
_ label (12) - clone (12)
-
def
_ class (12) -
def
_ delegator (12) -
def
_ instance _ delegator (12) -
default
_ event _ sources (12) - delegate (12)
- dup (12)
- handler= (12)
-
initialize
_ classes _ and _ modules (12) -
initialize
_ clone (12) -
initialize
_ copy (12) -
initialize
_ dup (12) -
initialize
_ methods _ etc (12) - inspect (24)
-
instance
_ delegate (12) -
instance
_ eval (24) -
instance
_ exec (12) -
instance
_ variable _ defined? (12) -
instance
_ variable _ get (12) -
marshal
_ dump (12) - max (48)
-
method
_ missing (12) - min (48)
- new (12)
-
ole
_ activex _ initialize (12) -
singleton
_ method (12) - struct (12)
-
to
_ json (12) -
to
_ s (24) -
yaml
_ initialize (12)
検索結果
先頭5件
-
RDoc
:: Context # initialize _ classes _ and _ modules -> () (6102.0) -
追加されたクラスやモジュールをクリアします。
追加されたクラスやモジュールをクリアします。 -
RDoc
:: Context # initialize _ methods _ etc -> () (6102.0) -
追加されたメソッド、属性、alias されたメソッド(メソッド名の対応が取れて いないものを含む)、require されたファイル、include されたファイル、定数 をクリアします。
追加されたメソッド、属性、alias されたメソッド(メソッド名の対応が取れて
いないものを含む)、require されたファイル、include されたファイル、定数
をクリアします。 -
Class
# new(*args , &block) -> object (35.0) -
自身のインスタンスを生成して返します。 このメソッドの引数はブロック引数も含め Object#initialize に渡されます。
...ク引数も含め Object#initialize に渡されます。
new は Class#allocate でインスタンスを生成し、
Object#initialize で初期化を行います。
@param args Object#initialize に渡される引数を指定します。
@param block Object#initialize に渡されるブロッ... -
Thread
:: Backtrace :: Location # base _ label -> String (13.0) -
self が表すフレームの基本ラベルを返します。通常、 Thread::Backtrace::Location#label から修飾を取り除いたもので構成 されます。
...されます。
//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.base_label
end
# => initialize
# new
# <main>
//}
@see Thread::Backtrace::Location#label... -
Thread
:: Backtrace :: Location # inspect -> String (13.0) -
Thread::Backtrace::Location#to_s の結果を人間が読みやすいような文 字列に変換したオブジェクトを返します。
...st[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.inspect
end
# => "path/to/foo.rb:5:in `initialize'"
# "path/to/foo.rb:9:in `new'"
# "path/to/foo.rb:9:in `<main>'"... -
Thread
:: Backtrace :: Location # to _ s -> String (13.0) -
self が表すフレームを Kernel.#caller と同じ表現にした文字列を返し ます。
...mlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.to_s
end
# => path/to/foo.rb:5:in `initialize'
# path/to/foo.rb:9:in `new'
# path/to/foo.rb:9:in `<main>'
//}... -
BasicObject
# ! -> bool (7.0) -
オブジェクトを真偽値として評価し、その論理否定を返します。
...せん。
@return オブジェクトが偽であれば真、さもなくば偽
//emlist[例][ruby]{
class NegationRecorder < BasicObject
def initialize
@count = 0
end
attr_reader :count
def !
@count += 1
super
end
end
recorder = NegationRecorder.new
!recorder
!!!!!!!record... -
BasicObject
# !=(other) -> bool (7.0) -
オブジェクトが other と等しくないことを判定します。
...er 比較対象となるオブジェクト
@see BasicObject#==, BasicObject#!
//emlist[例][ruby]{
class NonequalityRecorder < BasicObject
def initialize
@count = 0
end
attr_reader :count
def !=(other)
@count += 1
super
end
end
recorder = NonequalityRecorder.new
recorder !=... -
BasicObject
# ==(other) -> bool (7.0) -
オブジェクトが other と等しければ真を、さもなくば偽を返します。
...るオブジェクト
@return other が self と同値であれば真、さもなくば偽
//emlist[例][ruby]{
class Person < BasicObject
def initialize(name, age)
@name = name
@age = age
end
end
tanaka1 = Person.new("tanaka", 24)
tanaka2 = Person.new("tanaka", 24)
tanaka1 == tanaka1...