3009件ヒット
[1-100件を表示]
(0.059秒)
ライブラリ
- ビルトイン (1649)
- csv (51)
- date (12)
- delegate (12)
- drb (24)
-
drb
/ extserv (12) - erb (12)
- fiber (8)
- fiddle (12)
- json (72)
-
net
/ http (24) - openssl (60)
- ostruct (41)
- prime (24)
- pstore (36)
- psych (12)
- rake (12)
-
rexml
/ document (12) - shell (18)
-
shell
/ command-processor (6) -
shell
/ filter (12) - socket (12)
- strscan (24)
- thread (12)
- win32ole (840)
クラス
- Array (18)
- BasicObject (156)
-
CSV
:: Row (39) -
CSV
:: Table (12) - Class (24)
-
DRb
:: DRbObject (12) -
DRb
:: DRbServer (12) -
DRb
:: ExtServ (12) - Data (12)
- Date (12)
- ERB (12)
- Enumerator (132)
-
Enumerator
:: Yielder (24) - Fiber (42)
-
Fiddle
:: Pointer (12) - Hash (72)
-
JSON
:: Parser (12) -
JSON
:: State (48) - KeyError (16)
- LocalJumpError (12)
- Method (92)
- Module (144)
- Mutex (2)
- NameError (10)
-
Net
:: HTTPGenericRequest (24) - Object (438)
-
ObjectSpace
:: WeakMap (12) -
OpenSSL
:: ASN1 :: ObjectId (60) - OpenStruct (41)
- PStore (36)
- Prime (24)
-
Psych
:: ScalarScanner (12) -
REXML
:: Element (12) -
Rake
:: TaskArguments (12) - Random (36)
- Regexp (24)
- Shell (18)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (12) - Socket (12)
- StopIteration (12)
- String (24)
- StringScanner (24)
- Struct (114)
- Thread (44)
-
Thread
:: Mutex (10) -
Thread
:: Queue (36) -
Thread
:: SizedQueue (36) - TracePoint (19)
- UnboundMethod (12)
- WIN32OLE (60)
-
WIN32OLE
_ METHOD (204) -
WIN32OLE
_ PARAM (84) -
WIN32OLE
_ TYPE (240) -
WIN32OLE
_ TYPELIB (132) -
WIN32OLE
_ VARIABLE (84) -
WIN32OLE
_ VARIANT (36)
モジュール
- Enumerable (96)
-
JSON
:: Generator :: GeneratorMethods :: Object (12) - Kernel (12)
キーワード
- ! (12)
- != (12)
- < (12)
- << (12)
- <=> (36)
- == (39)
- === (32)
- DelegateClass (12)
- [] (108)
- []= (24)
-
_ _ drbref (12) -
_ _ id _ _ (12) -
_ _ send _ _ (24) -
_ dump (12) -
_ getproperty (12) -
_ invoke (12) - allocate (12)
-
bind
_ call (12) -
body
_ stream (12) -
body
_ stream= (12) - call (24)
-
class
_ eval (24) -
class
_ exec (12) -
class
_ variable _ set (12) -
connect
_ nonblock (12) - context (12)
- deconstruct (12)
-
def
_ class (12) - default (36)
-
default
_ event _ sources (12) -
default
_ ole _ types (12) - delete (36)
- deq (24)
- dig (20)
- dispid (12)
- display (12)
- each (72)
-
enum
_ for (24) - eql? (3)
- equal? (12)
- event? (12)
-
event
_ interface (12) -
exit
_ value (12) - extend (12)
- extended (12)
- feed (12)
- fetch (20)
- field (12)
- filter (14)
- front (24)
- guid (24)
- hash (3)
- helpcontext (24)
- helpfile (24)
-
implemented
_ ole _ types (12) - initialize (12)
-
initialize
_ copy (12) - input? (12)
- inspect (36)
-
instance
_ eval (24) -
instance
_ exec (12) -
instance
_ method (12) -
instance
_ of? (12) -
instance
_ variable _ defined? (12) -
instance
_ variable _ get (12) -
instance
_ variable _ set (12) -
instance
_ variables (12) - invkind (12)
- invoke (12)
-
invoke
_ kind (12) -
is
_ a? (12) - key (8)
-
kind
_ of? (12) -
library
_ name (12) - ln (12)
-
long
_ name (12) -
major
_ version (24) -
marshal
_ dump (12) - match (24)
- max (48)
-
method
_ missing (12) - methods (12)
- min (48)
-
minor
_ version (24) -
module
_ eval (24) -
module
_ exec (12) - name (60)
-
next
_ values (12) -
object
_ nl (12) -
object
_ nl= (12) -
offset
_ vtbl (12) - oid (12)
-
ole
_ classes (12) -
ole
_ methods (12) -
ole
_ type (36) -
ole
_ type _ detail (12) -
ole
_ typelib (24) -
ole
_ types (12) - optional? (12)
- parameters (19)
- params (12)
- parse (12)
- path (12)
-
peek
_ values (12) - pop (24)
- progid (12)
- pushd (6)
- pushdir (6)
- raise (18)
- rand (36)
- receiver (30)
-
remove
_ instance _ variable (12) - replace (12)
-
respond
_ to? (12) -
respond
_ to _ missing? (12) - result (12)
- resume (12)
-
return
_ type (12) -
return
_ type _ detail (12) -
return
_ value (12) -
return
_ vtype (12) -
scan
_ full (12) -
search
_ full (12) - select (24)
- send (24)
- shift (36)
-
short
_ name (12) -
singleton
_ class (12) -
singleton
_ method (12) -
singleton
_ method _ added (12) -
singleton
_ method _ removed (12) -
singleton
_ method _ undefined (12) -
singleton
_ methods (12) -
size
_ opt _ params (12) -
size
_ params (12) - sn (12)
-
source
_ ole _ types (12) -
src
_ type (12) - sum (18)
- synchronize (12)
- tainted? (6)
-
thread
_ variable _ get (12) -
to
_ a (12) -
to
_ ary (12) -
to
_ enum (24) -
to
_ h (31) -
to
_ hash (24) -
to
_ int (12) -
to
_ json (12) -
to
_ proc (12) -
to
_ regexp (12) -
to
_ s (84) -
to
_ str (12) -
to
_ value (12) - tokenize (12)
- transact (18)
- transaction (12)
- transfer (12)
- typekind (12)
- value (36)
- values (12)
-
values
_ at (24) -
variable
_ kind (12) - variables (12)
- varkind (12)
- version (12)
- visible? (48)
-
with
_ index (24) -
with
_ object (24) - yield (12)
- | (6)
検索結果
先頭5件
-
Object
# initialize _ copy(obj) -> object (21198.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 と......Error レシーバが freeze されているか、obj のクラスがレシーバ
のクラスと異なる場合に発生します。
@see Object#clone,Object#dup
以下に例として、dup や clone がこのメソッドをどのように利用しているかを示します。
obj.dup は、... -
Object
# send(name , *args) -> object (21139.0) -
オブジェクトのメソッド name を args を引数に して呼び出し、メソッドの実行結果を返します。
...のメソッドを呼び出せます。
d:spec/def#limit も参照してください。
public メソッドだけ呼び出せれば良い場合は
Object#public_send を使う方が良いでしょう。
@param name 文字列かSymbol で指定するメソッド名です。
@param args 呼び出す......ーバは任意(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 (21139.0) -
オブジェクトのメソッド name を args を引数に して呼び出し、メソッドの実行結果を返します。
...のメソッドを呼び出せます。
d:spec/def#limit も参照してください。
public メソッドだけ呼び出せれば良い場合は
Object#public_send を使う方が良いでしょう。
@param name 文字列かSymbol で指定するメソッド名です。
@param args 呼び出す......ーバは任意(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 _ set(var , value) -> object (21132.0) -
オブジェクトのインスタンス変数 var に値 value を設定します。
...value を返します。
//emlist[][ruby]{
obj = Object.new
p obj.instance_variable_set("@foo", 1) #=> 1
p obj.instance_variable_set(:@foo, 2) #=> 2
p obj.instance_variable_get(:@foo) #=> 2
//}
@see Object#instance_variable_get,Object#instance_variables,Object#instance_variable_defined?... -
Object
# initialize(*args , &block) -> object (21126.0) -
ユーザ定義クラスのオブジェクト初期化メソッド。
...このメソッドは Class#new から新しく生成されたオブ
ジェクトの初期化のために呼び出されます。他の言語のコンストラクタに相当します。
デフォルトの動作ではなにもしません。
initialize には
Class#new に与えられた引数が......nitialize Foo"
@name = name
end
end
class Bar < Foo
def initialize name, pass
puts "initialize Bar"
super name
@pass = pass
end
end
it = Bar.new('myname','0500')
p it
#=> initialize Bar
# initialize Foo
# #<Bar:0x2b68f08 @name="myname", @pass="0500">
//}
@see Class#new... -
Object
# instance _ variable _ get(var) -> object | nil (21126.0) -
オブジェクトのインスタンス変数の値を取得して返します。
...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_variable_defined?... -
Object
# marshal _ dump -> object (21114.0) -
Marshal.#dump を制御するメソッドです。
...oo
def initialize(arg)
@foo = arg
end
def marshal_dump
@foo
end
def marshal_load(obj)
p obj
@foo = obj
end
end
foo = Foo.new(['foo', 'bar'])
p foo #=> #<Foo:0xbaf3b0 @foo=["foo", "bar"]>
dms = Marshal.dump(foo)
p dms #=> "\004\bU:......定義されていてもマーシャルできるようになります
(特異メソッドの情報が自動的に dump されるようになるわけではなく、
marshal_dump/marshal_load によりそれを実現する余地があるということです)。
@see Object#marshal_load, Marshal... -
Object
# remove _ instance _ variable(name) -> object (21108.0) -
オブジェクトからインスタンス変数 name を取り除き、そのインス タンス変数に設定されていた値を返します。
...ない場合に発生します。
//emlist[][ruby]{
class Foo
def foo
@foo = 1
p remove_instance_variable(:@foo) #=> 1
p remove_instance_variable(:@foo) # instance variable @foo not defined (NameError)
end
end
Foo.new.foo
//}
@see Module#remove_class_variable,Module#remove_const... -
Object
# methods(include _ inherited = true) -> [Symbol] (21055.0) -
そのオブジェクトに対して呼び出せるメソッド名の一覧を返します。 このメソッドは public メソッドおよび protected メソッドの名前を返します。
...ected メソッドの名前を返します。
ただし特別に、引数が偽の時は Object#singleton_methods(false) と同じになっています。
@param include_inherited 引数が偽の時は Object#singleton_methods(false) と同じになります。
//emlist[例1][ruby]{
class Parent......nd
class Foo < Parent
private; def private_foo() end
protected; def protected_foo() end
public; def public_foo() end
end
obj = Foo.new
class <<obj
private; def private_singleton() end
protected; def protected_singleton() end
public; def public_singleton() end......指定して
# いるが、Object のインスタンスメソッドは一覧から排除している。
p obj.methods(true) - Object.instance_methods(true)
p obj.public_methods(true) - Object.public_instance_methods(true)
p obj.private_methods(true) - Object.private_instance_methods(t...