2947件ヒット
[1-100件を表示]
(0.253秒)
クラス
-
ARGF
. class (843) - Array (44)
- BasicObject (132)
- Class (58)
-
Enumerator
:: Lazy (5) - Exception (11)
- FalseClass (55)
- Hash (72)
- IO (11)
- Method (194)
- Module (593)
- NameError (9)
- NilClass (149)
- Object (385)
- Proc (23)
- Regexp (11)
-
RubyVM
:: InstructionSequence (11) - Thread (33)
-
Thread
:: Backtrace :: Location (44) - TracePoint (33)
- TrueClass (55)
- UnboundMethod (44)
モジュール
- Enumerable (132)
キーワード
- ! (11)
- != (11)
- & (33)
- < (11)
- << (12)
- <=> (11)
- == (22)
- === (18)
- =~ (6)
- >> (12)
- [] (11)
- ^ (33)
-
_ _ send _ _ (22) -
_ dump (11) -
_ load (11) -
absolute
_ path (11) -
add
_ trace _ func (11) - allocate (11)
- ancestors (11)
-
append
_ features (11) - argv (11)
- arity (22)
- attr (9)
-
attr
_ accessor (3) -
attr
_ reader (3) -
attr
_ writer (3) - autoload (11)
- backtrace (11)
-
base
_ label (11) - bind (11)
- binmode (11)
- binmode? (11)
- bytes (14)
- call (22)
-
callee
_ id (11) - chars (14)
-
class
_ eval (22) -
class
_ exec (11) -
class
_ variable _ defined? (11) -
class
_ variable _ get (11) -
class
_ variable _ set (11) -
class
_ variables (11) - clone (33)
- close (11)
- closed? (11)
- codepoints (14)
-
const
_ defined? (11) -
const
_ get (11) -
const
_ missing (11) -
const
_ source _ location (5) - constants (11)
-
define
_ method (22) -
define
_ singleton _ method (22) -
defined
_ class (11) - display (11)
- dup (22)
- each (44)
-
each
_ byte (22) -
each
_ char (22) -
each
_ codepoint (22) -
each
_ entry (22) -
each
_ line (44) - eager (5)
- eof (11)
- eof? (11)
- extend (11)
-
external
_ encoding (11) - file (11)
- filename (11)
- fileno (11)
-
fixed
_ encoding? (11) - getbyte (11)
- getc (11)
- gets (33)
- include (11)
- include? (11)
- included (11)
- inherited (11)
- initialize (11)
-
initialize
_ copy (11) -
inplace
_ mode (11) -
inplace
_ mode= (11) - inspect (77)
-
instance
_ eval (22) -
instance
_ exec (11) -
instance
_ method (11) -
instance
_ methods (11) -
instance
_ of? (11) -
instance
_ variable _ defined? (11) -
instance
_ variable _ get (11) -
instance
_ variables (11) -
internal
_ encoding (11) -
is
_ a? (11) -
kind
_ of? (11) - lambda? (11)
- lineno (11)
- lineno= (11)
- lines (42)
-
marshal
_ dump (11) -
marshal
_ load (11) - max (44)
- merge (22)
-
method
_ added (11) -
method
_ defined? (11) -
method
_ id (11) -
method
_ missing (11) -
method
_ removed (11) -
method
_ undefined (11) - methods (11)
- min (44)
-
module
_ eval (22) -
module
_ exec (11) - name (22)
- new (11)
- nil? (11)
-
original
_ name (22) - owner (22)
- parameters (11)
- path (11)
- pos (11)
- pos= (11)
- prepend (11)
-
prepend
_ features (11) - prepended (11)
- print (11)
- printf (11)
- private (23)
-
private
_ class _ method (15) -
private
_ constant (11) -
private
_ method _ defined? (11) -
protected
_ method _ defined? (11) -
public
_ class _ method (15) -
public
_ constant (11) -
public
_ method (11) -
public
_ method _ defined? (11) - putc (11)
- puts (11)
- rationalize (22)
- read (11)
-
read
_ nonblock (11) - readbyte (22)
- readchar (11)
- readline (33)
- readlines (33)
- readpartial (11)
- receiver (20)
- refine (11)
-
remove
_ class _ variable (11) -
remove
_ const (11) -
remove
_ instance _ variable (11) -
remove
_ method (11) - replace (11)
-
respond
_ to? (11) -
respond
_ to _ missing? (11) - rewind (11)
- seek (11)
- send (22)
-
set
_ encoding (33) -
set
_ trace _ func (11) -
singleton
_ class (11) -
singleton
_ class? (11) -
singleton
_ method (11) -
singleton
_ method _ added (11) -
singleton
_ method _ removed (11) -
singleton
_ method _ undefined (11) -
singleton
_ methods (11) - skip (11)
-
sort
_ by (22) -
source
_ location (11) - subclasses (3)
-
super
_ method (10) - superclass (11)
- tell (11)
-
to
_ a (66) -
to
_ ary (22) -
to
_ c (11) -
to
_ f (11) -
to
_ h (28) -
to
_ hash (11) -
to
_ i (22) -
to
_ int (11) -
to
_ io (11) -
to
_ proc (22) -
to
_ r (11) -
to
_ regexp (11) -
to
_ s (88) -
to
_ str (11) -
to
_ write _ io (11) - unbind (11)
-
undef
_ method (11) - write (11)
- | (33)
検索結果
先頭5件
-
Object
# class -> Class (26259.0) -
レシーバのクラスを返します。
...レシーバのクラスを返します。
//emlist[][ruby]{
p "ruby".class #=> String
p 100.class #=> Integer
p ARGV.class #=> Array
p self.class #=> Object
p Class.class #=> Class
p Kernel.class #=> Module
//}
@see Class#superclass,Object#kind_of?,Object#instance_of?... -
Class
# subclasses -> [Class] (23234.0) -
自身が直接のスーパークラスになっている(特異クラスを除く)クラスの配列を返します。 返り値の配列の順序は未定義です。
...を除く)クラスの配列を返します。
返り値の配列の順序は未定義です。
//emlist[例][ruby]{
class A; end
class B < A; end
class C < B; end
class D < A; end
A.subclasses # => [D, B]
B.subclasses # => [C]
C.subclasses # => []
//}
@see Class#superclass... -
Class
# superclass -> Class | nil (23222.0) -
自身のスーパークラスを返します。
...{
File.superclass #=> IO
IO.superclass #=> Object
class Foo; end
class Bar < Foo; end
Bar.superclass #=> Foo
Object.superclass #=> BasicObject
//}
ただし BasicObject.superclass は nil を返します。
//emlist[例][ruby]{
BasicObject.superclass #=> nil......//}
@see Class#subclasses... -
Class
# inherited(subclass) -> () (17139.0) -
クラスのサブクラスが定義された時、新しく生成されたサブクラスを引数 にインタプリタから呼び出されます。このメソッドが呼ばれるタイミングは クラス定義文の実行直前です。
...@param subclass プログラム内で新たに定義された自身のサブクラスです。
//emlist[例][ruby]{
class Foo
def Foo.inherited(subclass)
puts "class \"#{self}\" was inherited by \"#{subclass}\""
end
end
class Bar < Foo
puts "executing class body"
end
# => class "Foo" was......inherited by "Bar"
# executing class body
//}... -
Class
# _ load(str) -> Class (17104.0) -
Object#_dump を参照して下さい。
Object#_dump を参照して下さい。
@param str Ruby のオブジェクトがダンプされた文字列を指定します。 -
Class
# new(*args , &block) -> object (17027.0) -
自身のインスタンスを生成して返します。 このメソッドの引数はブロック引数も含め Object#initialize に渡されます。
...new は Class#allocate でインスタンスを生成し、
Object#initialize で初期化を行います。
@param args Object#initialize に渡される引数を指定します。
@param block Object#initialize に渡されるブロックを指定します。
//emlist[例][ruby]{
# Class クラ......スのインスタンス、C クラスを生成
C = Class.new # => C
# Class クラスのインスタンス、C クラスのインスタンスを生成
C.new # => #<C:0x00005623f8b4e458>
//}... -
Class
# allocate -> object (17009.0) -
自身のインスタンスを生成して返します。生成したオブジェクトは 自身のインスタンスであること以外には何も特性を持ちません。
...したオブジェクトは
自身のインスタンスであること以外には何も特性を持ちません。
//emlist[例][ruby]{
klass = Class.new do
def initialize(*args)
@initialized = true
end
def initialized?
@initialized || false
end
end
klass.allocate.initialized? #=... -
TracePoint
# defined _ class -> Class | module (14253.0) -
メソッドを定義したクラスかモジュールを返します。
...メソッドを定義したクラスかモジュールを返します。
//emlist[例][ruby]{
class C; def foo; end; end
trace = TracePoint.new(:call) do |tp|
p tp.defined_class # => C
end.enable do
C.new.foo
end
//}
メソッドがモジュールで定義されていた場合も(include に......//emlist[例][ruby]{
module M; def foo; end; end
class C; include M; end;
trace = TracePoint.new(:call) do |tp|
p tp.defined_class # => M
end.enable do
C.new.foo
end
//}
[注意] 特異メソッドを実行した場合は TracePoint#defined_class は特異クラ
スを返します。また、K......ラメータは特異クラスではなく元のクラスを返します。
//emlist[例][ruby]{
class C; def self.foo; end; end
trace = TracePoint.new(:call) do |tp|
p tp.defined_class # => #<Class:C>
end.enable do
C.foo
end
//}
Kernel.#set_trace_func と TracePoint の上記の差分に注... -
Object
# singleton _ class -> Class (14241.0) -
レシーバの特異クラスを返します。 まだ特異クラスがなければ、新しく作成します。
...れ NilClass, TrueClass,
FalseClass を返します。
@raise TypeError レシーバが Integer、Float、Symbol の場合に発生します。
//emlist[][ruby]{
Object.new.singleton_class #=> #<Class:#<Object:0xb7ce1e24>>
String.singleton_class #=> #<Class:String>
nil.singleton_class......#=> NilClass
//}
@see Object#class... -
Module
# class _ variable _ defined?(name) -> bool (14134.0) -
name で与えられた名前のクラス変数がモジュールに存在する場合 true を 返します。
...name Symbol か String を指定します。
//emlist[例][ruby]{
class Fred
@@foo = 99
end
Fred.class_variable_defined?(:@@foo) #=> true
Fred.class_variable_defined?(:@@bar) #=> false
Fred.class_variable_defined?('@@foo') #=> true
Fred.class_variable_defined?('@@bar') #=> false
//}...