2797件ヒット
[1-100件を表示]
(0.050秒)
別のキーワード
種類
ライブラリ
- ビルトイン (1776)
- csv (12)
- delegate (12)
- erb (12)
- forwardable (12)
-
irb
/ extend-command (12) - json (84)
- monitor (12)
-
mutex
_ m (12) - objspace (48)
- openssl (48)
- optparse (144)
- pp (36)
- psych (31)
-
rdoc
/ code _ object (12) -
rdoc
/ known _ classes (12) - singleton (12)
- timeout (37)
- win32ole (84)
クラス
-
ARGF
. class (192) - BasicObject (144)
- CSV (12)
- Class (72)
- Dir (72)
- ERB (12)
- File (36)
- Hash (36)
- IO (48)
-
JSON
:: Parser (24) -
JSON
:: State (12) - Method (92)
- Module (282)
- NameError (10)
- Object (492)
-
OpenSSL
:: ASN1 :: ObjectId (24) - OptionParser (144)
- PP (12)
-
RDoc
:: CodeObject (12) -
WIN32OLE
_ TYPE (48) -
WIN32OLE
_ TYPELIB (36)
モジュール
- Enumerable (120)
-
IRB
:: ExtendCommandBundle (12) - JSON (24)
-
JSON
:: Generator :: GeneratorMethods :: Object (12) -
JSON
:: Generator :: GeneratorMethods :: String (12) - Kernel (76)
- Marshal (24)
- ObjectSpace (144)
-
OpenSSL
:: ASN1 (24) - Psych (19)
- RDoc (12)
- Timeout (21)
キーワード
- ! (12)
- != (12)
-
$ FILENAME (12) -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - < (12)
- <=> (12)
- == (12)
- === (20)
- ARGF (24)
- BasicObject (12)
- Class (12)
- DelegateClass (12)
- FALSE (8)
- Forwardable (12)
-
KNOWN
_ CLASSES (12) - Marshal フォーマット (12)
- Method (12)
- MonitorMixin (12)
-
Mutex
_ m (12) -
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 3 . 0 (10) -
NEWS for Ruby 2
. 4 . 0 (9) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 6 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (5) - NIL (8)
- ObjectId (24)
- Options (12)
- Ruby プログラムの実行 (12)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (12)
- Ruby用語集 (12)
- Singleton (12)
- String (12)
- TRUE (8)
- [] (24)
-
_ _ send _ _ (24) -
_ dump (12) -
_ load (12) - allocate (12)
- ancestors (12)
- argv (12)
-
boot
_ defclass (12) - call (24)
- class (12)
-
class
_ eval (24) -
class
_ exec (12) -
class
_ variable _ get (12) -
class
_ variables (12) - clone (12)
-
const
_ defined? (12) -
const
_ get (12) -
const
_ source _ location (12) - constants (24)
-
count
_ objects (12) -
count
_ objects _ size (12) -
count
_ tdata _ objects (12) - coverage (8)
-
create
_ id (12) - debug (12)
-
def
_ class (12) -
def
_ extend _ command (12) -
default
_ event _ sources (12) -
define
_ finalizer (24) -
define
_ singleton _ method (24) - display (12)
- drb (12)
-
drb
/ extservm (12) - dump (24)
- dup (12)
- each (48)
-
each
_ byte (24) -
each
_ char (24) -
each
_ line (48) -
each
_ object (48) - extend (12)
-
for
_ fd (12) - getbyte (12)
- getc (12)
-
global
_ variables (12) - include (12)
- initialize (12)
-
initialize
_ copy (12) - inspect (24)
-
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) - irb (12)
-
irb
/ completion (12) -
is
_ a? (12) -
kind
_ of? (12) -
local
_ variables (12) -
marshal
_ dump (12) -
marshal
_ load (12) - max (48)
-
method
_ missing (12) - methods (12)
- min (48)
-
module
_ eval (24) -
module
_ exec (12) - new (168)
-
object
_ group (12) -
ole
_ classes (24) -
ole
_ type (12) -
ole
_ types (12) - on (144)
- open (96)
- parameters (12)
- parse (12)
-
pretty
_ print (12) -
pretty
_ print _ cycle (12) -
private
_ constant (9) -
public
_ constant (9) -
public
_ method (12) - putc (12)
-
rb
_ class _ real (12) -
rb
_ define _ class _ under (12) -
rb
_ obj _ class (12) - rdoc (12)
-
reachable
_ objects _ from (12) - receiver (22)
-
remove
_ class _ variable (12) -
remove
_ classes _ and _ modules (12) -
remove
_ const (12) -
remove
_ instance _ variable (12) - replace (12)
-
respond
_ to? (12) -
respond
_ to _ missing? (12) -
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 2 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) -
safe
_ load (19) - send (24)
-
singleton
_ class (12) -
singleton
_ method (12) -
singleton
_ method _ added (12) -
singleton
_ method _ removed (12) -
singleton
_ method _ undefined (12) -
singleton
_ methods (12) -
sort
_ by (24) - superclass (12)
- timeout (37)
-
to
_ ary (12) -
to
_ hash (12) -
to
_ int (12) -
to
_ json (12) -
to
_ json _ raw _ object (12) -
to
_ proc (12) -
to
_ regexp (12) -
to
_ s (24) -
to
_ str (12) -
trace
_ object _ allocations (12) -
undefine
_ finalizer (12) - yaml (12)
-
yaml
_ tag (12) - オブジェクト指向スクリプト言語 Ruby リファレンスマニュアル (12)
- クラス/メソッドの定義 (12)
- メソッド呼び出し(super・ブロック付き・yield) (12)
- 変数と定数 (12)
検索結果
先頭5件
-
Object
# class -> Class (39274.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?... -
Object
# singleton _ class -> Class (27256.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... -
Object
# initialize _ copy(obj) -> object (21197.0) -
(拡張ライブラリによる) ユーザ定義クラスのオブジェクトコピーの初期化メソッド。
...elf のインスタンス変数や特異メソッドは変化しません。
デフォルトでは、Object#clone の内部で Object#initialize_clone から、
また Object#dup の内部で Object#initialize_dup から呼ばれます。
initialize_copy は、Ruby インタプリタが知り得......alize_copy でコピーするよう定義しておくことで、dup や clone
を再定義する必要がなくなります。
デフォルトの Object#initialize_copy は、 freeze チェックおよび型のチェックを行い self
を返すだけのメソッドです。
initialize_copy と......ます。
@see Object#clone,Object#dup
以下に例として、dup や clone がこのメソッドをどのように利用しているかを示します。
obj.dup は、新たに生成したオブジェクトに対して
initialize_copy を呼び
//emlist[][ruby]{
obj2 = obj.class.allocate
obj2.... -
Object
# singleton _ methods(inherited _ too = true) -> [Symbol] (21144.0) -
そのオブジェクトに対して定義されている特異メソッド名 (public あるいは protected メソッド) の一覧を返します。
...た特異メソッドとは Object#extend によって追加された特異メソッドや、
self がクラスの場合はスーパークラスのクラスメソッド(Classのインスタンスの特異メソッド)などです。
singleton_methods(false) は、Object#methods(false) と同じで......by]{
Parent = Class.new
class <<Parent
private; def private_class_parent() end
protected; def protected_class_parent() end
public; def public_class_parent() end
end
Foo = Class.new(Parent)
class <<Foo
private; def private_class_foo() end
protected; def protected_class_foo() end......public; def public_class_foo() end
end
module Bar
private; def private_bar() end
protected; def protected_bar() end
public; def public_bar() end
end
obj = Foo.new
class <<obj
include Bar
private; def private_self() end
protected; def protected_self() end
public;... -
Object
:: ARGF -> Object (21135.0) -
引数 (なければ標準入力) で構成される仮想ファイル (詳細は ARGF、ARGF.class を参照)。
...で構成される仮想ファイル
(詳細は ARGF、ARGF.class を参照)。
つまり Kernel.#gets は ARGF.class#gets と同じ意味です。
ARGF.class#file で現在読み込み中のファイルオブジェクトが、
ARGF.class#filename で現在読み込み中のファイル名が得... -
Object
# initialize(*args , &block) -> object (21131.0) -
ユーザ定義クラスのオブジェクト初期化メソッド。
...。
このメソッドは Class#new から新しく生成されたオブ
ジェクトの初期化のために呼び出されます。他の言語のコンストラクタに相当します。
デフォルトの動作ではなにもしません。
initialize には
Class#new に与えられた引数......@param block 初期化時のブロック引数です。必須ではありません。
//emlist[][ruby]{
class Foo
def initialize name
puts "initialize Foo"
@name = name
end
end
class Bar < Foo
def initialize name, pass
puts "initialize Bar"
super name
@pass = pass
end
e......nd
it = Bar.new('myname','0500')
p it
#=> initialize Bar
# initialize Foo
# #<Bar:0x2b68f08 @name="myname", @pass="0500">
//}
@see Class#new... -
Object
# send(name , *args) -> object (21126.0) -
オブジェクトのメソッド name を args を引数に して呼び出し、メソッドの実行結果を返します。
...場合は
Object#public_send を使う方が良いでしょう。
@param name 文字列かSymbol で指定するメソッド名です。
@param args 呼び出すメソッドに渡す引数です。
//emlist[][ruby]{
p -365.send(:abs) #=> 365
p "ruby".send(:sub,/./,"R") #=> "Ruby"
class Foo
def......ーバは任意(Foo クラスのインスタンスである必要もない)
p Foo.new.send(methods[1]) # => "foo"
p Foo.new.send(methods[2]) # => "bar"
p Foo.new.send(methods[3]) # => "baz"
//}
@see Object#public_send, BasicObject#__send__, Object#method, Kernel.#eval, Proc, Method... -
Object
# send(name , *args) { . . . . } -> object (21126.0) -
オブジェクトのメソッド name を args を引数に して呼び出し、メソッドの実行結果を返します。
...場合は
Object#public_send を使う方が良いでしょう。
@param name 文字列かSymbol で指定するメソッド名です。
@param args 呼び出すメソッドに渡す引数です。
//emlist[][ruby]{
p -365.send(:abs) #=> 365
p "ruby".send(:sub,/./,"R") #=> "Ruby"
class Foo
def......ーバは任意(Foo クラスのインスタンスである必要もない)
p Foo.new.send(methods[1]) # => "foo"
p Foo.new.send(methods[2]) # => "bar"
p Foo.new.send(methods[3]) # => "baz"
//}
@see Object#public_send, BasicObject#__send__, Object#method, Kernel.#eval, Proc, Method... -
Object
# instance _ variable _ get(var) -> object | nil (21125.0) -
オブジェクトのインスタンス変数の値を取得して返します。
...ist[][ruby]{
class Foo
def initialize
@foo = 1
end
end
obj = Foo.new
p obj.instance_variable_get("@foo") #=> 1
p obj.instance_variable_get(:@foo) #=> 1
p obj.instance_variable_get(:@bar) #=> nil
//}
@see Object#instance_variable_set,Object#instance_variables,Object#instance_v...