2806件ヒット
[1-100件を表示]
(0.115秒)
クラス
-
ARGF
. class (706) - Array (24)
- BasicObject (144)
- Class (48)
-
Enumerator
:: Lazy (6) - Exception (12)
- FalseClass (60)
- Hash (55)
- IO (12)
- Method (213)
- Module (600)
- NameError (10)
- NilClass (151)
- Object (420)
-
RubyVM
:: InstructionSequence (12) - Set (3)
- Thread (36)
-
Thread
:: Backtrace :: Location (48) - TracePoint (36)
- TrueClass (60)
- UnboundMethod (48)
モジュール
- Enumerable (102)
キーワード
- ! (12)
- != (12)
- & (36)
- < (12)
- << (7)
- <=> (12)
- == (24)
- === (20)
- =~ (7)
- >> (7)
- [] (12)
- ^ (36)
-
_ _ send _ _ (24) -
_ dump (12) -
_ load (12) -
absolute
_ path (12) -
add
_ trace _ func (12) - allocate (12)
- ancestors (12)
-
append
_ features (12) - arity (24)
- attr (12)
-
attr
_ accessor (4) -
attr
_ reader (4) -
attr
_ writer (4) - autoload (12)
- backtrace (12)
-
base
_ label (12) - bind (12)
- bytes (14)
- call (24)
-
callee
_ id (12) - chars (7)
-
class
_ eval (24) -
class
_ exec (12) -
class
_ variable _ get (12) -
class
_ variable _ set (12) -
class
_ variables (12) - classify (3)
- clone (12)
- codepoints (14)
-
const
_ defined? (12) -
const
_ get (12) -
const
_ source _ location (12) - constants (12)
-
define
_ method (24) -
define
_ singleton _ method (24) -
defined
_ class (12) - display (12)
- each (36)
-
each
_ byte (24) -
each
_ char (12) -
each
_ codepoint (24) -
each
_ entry (24) -
each
_ line (36) - eager (6)
- extend (12)
-
external
_ encoding (12) - filename (12)
- fileno (12)
- getbyte (12)
- getc (12)
- gets (36)
- inherited (12)
- initialize (12)
-
initialize
_ copy (12) -
inplace
_ mode (12) -
inplace
_ mode= (12) - inspect (84)
-
instance
_ eval (24) -
instance
_ exec (12) -
instance
_ method (12) -
instance
_ methods (12) -
instance
_ of? (12) -
instance
_ variable _ defined? (12) -
instance
_ variable _ get (12) -
instance
_ variables (12) -
internal
_ encoding (12) -
is
_ a? (12) -
kind
_ of? (12) - lineno (12)
- lines (35)
-
marshal
_ dump (12) -
marshal
_ load (12) - max (24)
- merge (24)
-
method
_ added (12) -
method
_ defined? (12) -
method
_ id (12) -
method
_ missing (12) -
method
_ removed (12) -
method
_ undefined (12) - methods (12)
- min (24)
-
module
_ eval (24) -
module
_ exec (12) - name (24)
- new (12)
-
original
_ name (24) - owner (24)
- parameters (12)
- path (12)
- pos (12)
-
prepend
_ features (12) - print (12)
- printf (12)
- private (48)
-
private
_ class _ method (24) -
private
_ constant (12) -
private
_ method _ defined? (12) -
protected
_ method _ defined? (12) -
public
_ class _ method (24) -
public
_ constant (12) -
public
_ method (12) -
public
_ method _ defined? (12) - putc (12)
- puts (12)
- rationalize (24)
- read (12)
-
read
_ nonblock (12) - readbyte (24)
- readchar (12)
- readline (36)
- readlines (24)
- readpartial (12)
- receiver (22)
-
remove
_ class _ variable (12) -
remove
_ const (12) -
remove
_ instance _ variable (12) -
remove
_ method (12) - replace (12)
-
respond
_ to? (12) -
respond
_ to _ missing? (12) - seek (12)
- send (24)
-
set
_ encoding (36) -
set
_ trace _ func (12) -
singleton
_ class (12) -
singleton
_ class? (12) -
singleton
_ method (12) -
singleton
_ method _ added (12) -
singleton
_ method _ removed (12) -
singleton
_ method _ undefined (12) -
singleton
_ methods (12) -
sort
_ by (24) -
source
_ location (12) -
super
_ method (11) - tell (12)
-
to
_ a (72) -
to
_ ary (24) -
to
_ c (12) -
to
_ f (12) -
to
_ h (31) -
to
_ hash (12) -
to
_ i (24) -
to
_ int (12) -
to
_ io (12) -
to
_ proc (24) -
to
_ r (12) -
to
_ regexp (12) -
to
_ s (96) -
to
_ set (6) -
to
_ str (12) -
to
_ write _ io (12) - unbind (12)
-
undef
_ method (12) - write (12)
- | (36)
検索結果
先頭5件
-
Object
# class -> Class (21359.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
# inherited(subclass) -> () (15339.0) -
クラスのサブクラスが定義された時、新しく生成されたサブクラスを引数 にインタプリタから呼び出されます。このメソッドが呼ばれるタイミングは クラス定義文の実行直前です。
...bclass プログラム内で新たに定義された自身のサブクラスです。
//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 inherite......d by "Bar"
# executing class body
//}... -
Class
# allocate -> object (15209.0) -
自身のインスタンスを生成して返します。生成したオブジェクトは 自身のインスタンスであること以外には何も特性を持ちません。
...ェクトは
自身のインスタンスであること以外には何も特性を持ちません。
//emlist[例][ruby]{
klass = Class.new do
def initialize(*args)
@initialized = true
end
def initialized?
@initialized || false
end
end
klass.allocate.initialized? #=> false
//}... -
Object
# singleton _ class -> Class (12441.0) -
レシーバの特異クラスを返します。 まだ特異クラスがなければ、新しく作成します。
... true か false なら、それぞれ 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
# public _ class _ method(*name) -> self (12329.0) -
name で指定したクラスメソッド (クラスの特異メソッド) の 可視性を public に変更します。
...String または Symbol を指定します。
@param names 0 個以上の String または Symbol を Array で指定します。
//emlist[例][ruby]{
class Foo
def self.foo
"foo"
end
private_class_method :foo
end
Foo.foo # NoMethodError: private method `foo' called for Foo:Class
Foo.......public_class_method(:foo) # => Foo
Foo.foo # => "foo"
//}... -
Module
# public _ class _ method(names) -> self (12329.0) -
name で指定したクラスメソッド (クラスの特異メソッド) の 可視性を public に変更します。
...String または Symbol を指定します。
@param names 0 個以上の String または Symbol を Array で指定します。
//emlist[例][ruby]{
class Foo
def self.foo
"foo"
end
private_class_method :foo
end
Foo.foo # NoMethodError: private method `foo' called for Foo:Class
Foo.......public_class_method(:foo) # => Foo
Foo.foo # => "foo"
//}... -
Module
# singleton _ class? -> bool (12328.0) -
self が特異クラスの場合に true を返します。そうでなければ false を返し ます。
...self が特異クラスの場合に true を返します。そうでなければ false を返し
ます。
//emlist[例][ruby]{
class C
end
C.singleton_class? # => false
C.singleton_class.singleton_class? # => true
//}... -
Module
# private _ class _ method(*name) -> self (12323.0) -
name で指定したクラスメソッド (クラスの特異メソッド) の 可視性を private に変更します。
...性を private に変更します。
@param name 0 個以上の String または Symbol を指定します。
@param names 0 個以上の String または Symbol を Array で指定します。
//emlist[例][ruby]{
module Foo
def self.foo; end
end
Foo.singleton_class.private_method_defined?(:f......oo) # => false
Foo.private_class_method(:foo) # => Foo
Foo.singleton_class.private_method_defined?(:foo) # => true
//}... -
Module
# private _ class _ method(names) -> self (12323.0) -
name で指定したクラスメソッド (クラスの特異メソッド) の 可視性を private に変更します。
...性を private に変更します。
@param name 0 個以上の String または Symbol を指定します。
@param names 0 個以上の String または Symbol を Array で指定します。
//emlist[例][ruby]{
module Foo
def self.foo; end
end
Foo.singleton_class.private_method_defined?(:f......oo) # => false
Foo.private_class_method(:foo) # => Foo
Foo.singleton_class.private_method_defined?(:foo) # => true
//}...