1089件ヒット
[201-300件を表示]
(0.126秒)
種類
ライブラリ
- ビルトイン (516)
- csv (22)
- digest (11)
- forwardable (55)
- json (11)
-
minitest
/ spec (1) -
minitest
/ unit (2) - openssl (11)
- pp (11)
- prime (77)
-
rdoc
/ context (11) -
rubygems
/ command _ manager (11) - singleton (22)
- syslog (11)
-
webrick
/ httpservlet / abstract (11) -
webrick
/ httpservlet / prochandler (11) - zlib (11)
クラス
- BasicObject (44)
- CSV (22)
-
Gem
:: CommandManager (11) -
JSON
:: Parser (11) - Module (143)
- Object (199)
- Prime (66)
-
RDoc
:: Context (11) - UnboundMethod (76)
-
WEBrick
:: HTTPServlet :: AbstractServlet (11) -
WEBrick
:: HTTPServlet :: ProcHandler (11)
モジュール
- Enumerable (11)
- Forwardable (44)
- Kernel (33)
-
MiniTest
:: Assertions (2) - Singleton (11)
- Syslog (11)
オブジェクト
- main (22)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - === (11)
- Digest (11)
- Instance (11)
- Marshal フォーマット (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) - Prime (11)
- Ruby用語集 (11)
- SingleForwardable (11)
- Singleton (11)
- TYPES (11)
- ZStream (11)
- arity (11)
-
assert
_ instance _ of (1) -
assert
_ kind _ of (1) - bind (11)
-
bind
_ call (10) -
class
_ eval (11) -
class
_ variables (11) - constants (11)
-
def
_ delegator (11) -
def
_ instance _ delegator (11) -
def
_ instance _ delegators (11) -
define
_ method (44) - each (22)
- eval (11)
-
get
_ instance (22) -
global
_ variables (11) - grep (11)
-
initialize
_ copy (11) -
ins
_ methods _ i (11) -
ins
_ methods _ priv _ i (11) -
ins
_ methods _ prot _ i (11) - inspect (11)
-
instance
_ delegate (11) -
instance
_ eval (22) -
instance
_ exec (11) -
instance
_ method (11) -
instance
_ methods (11) -
instance
_ of? (11) -
instance
_ variable _ defined? (11) -
instance
_ variable _ get (11) -
instance
_ variable _ set (11) -
instance
_ variables (11) -
int
_ from _ prime _ division (11) - irb (11)
-
irb
/ completion (11) -
is
_ a? (11) -
kind
_ of? (11) -
local
_ variables (11) - methods (11)
-
module
_ eval (11) -
must
_ be _ instance _ of (1) - new (11)
-
original
_ name (11) -
pretty
_ print _ instance _ variables (11) - prime? (11)
-
prime
_ division (11) -
private
_ instance _ methods (11) -
private
_ methods (11) -
protected
_ instance _ methods (11) -
protected
_ methods (11) -
public
_ instance _ method (11) -
public
_ instance _ methods (11) -
public
_ method (11) -
public
_ methods (11) -
rb
_ class _ allocate _ instance (11) -
rb
_ class _ instance _ methods (11) -
rb
_ class _ new _ instance (11) -
rb
_ class _ private _ instance _ methods (11) -
rb
_ class _ protected _ instance _ methods (11) -
rb
_ is _ instance _ id (11) -
rb
_ obj _ instance _ eval (11) -
rb
_ obj _ instance _ variables (11) -
rb
_ obj _ is _ instance _ of (11) -
rb
_ obj _ remove _ instance _ variable (11) -
remove
_ class _ variable (11) -
remove
_ instance _ variable (11) -
respond
_ to? (11) -
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 4 feature (11) -
ruby 1
. 9 feature (11) -
singleton
_ method (11) -
singleton
_ method _ undefined (11) -
source
_ location (11) -
specific
_ eval (11) -
to
_ s (11) - 変数と定数 (11)
検索結果
先頭5件
-
VALUE rb
_ class _ new _ instance(int argc , VALUE *argv , VALUE klass) (12300.0) -
Class#new の実体です。
Class#new の実体です。 -
VALUE rb
_ obj _ instance _ eval(int argc , VALUE *argv , VALUE self) (12300.0) -
-
int rb
_ is _ instance _ id(ID id) (12300.0) -
インスタンス変数名として有効な ID ならば真。
...インスタンス変数名として有効な ID ならば真。... -
BasicObject
# instance _ eval {|obj| . . . } -> object (12268.0) -
オブジェクトのコンテキストで文字列 expr またはオブジェクト自身をブロックパラメータとするブロックを 評価してその結果を返します。
...では instance_eval の外側のスコープと、ブロックの評価ではそのブロックの外側のスコープと、共有します。
メソッド定義の中で instance_eval でメソッドを定義した場合は、囲むメソッドが実行されたときに
初めて instance_eval......す。これはメソッド定義のネストと同じです。
d:spec/def#nest_method を参照してください。
BasicObject を継承して作ったクラス内で instance_eval する場合はトップレベルの定数や Kernel モジュールに定義されているメソッドは見え......です。
@param filename 文字列を指定します。ファイル filename に文字列 expr が
書かれているかのように実行されます。スタックトレースの
表示などを差し替えることができます。
@param lineno 整数を指定... -
Object
# instance _ variable _ get(var) -> object | nil (12237.0) -
オブジェクトのインスタンス変数の値を取得して返します。
...nil を返します。
@param var インスタンス変数名を文字列か Symbol で指定します。
//emlist[][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_v......ariable_get(:@bar) #=> nil
//}
@see Object#instance_variable_set,Object#instance_variables,Object#instance_variable_defined?... -
Object
# instance _ variable _ set(var , value) -> object (12237.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?... -
Module
# instance _ method(name) -> UnboundMethod (12231.0) -
self のインスタンスメソッド name をオブジェクト化した UnboundMethod を返します。
...tring で指定します。
@raise NameError self に存在しないメソッドを指定した場合に発生します。
@see Module#public_instance_method, Object#method
//emlist[例][ruby]{
class Interpreter
def do_a() print "there, "; end
def do_d() print "Hello "; end
def do_e() prin......_v() print "Dave"; end
Dispatcher = {
"a" => instance_method(:do_a),
"d" => instance_method(:do_d),
"e" => instance_method(:do_e),
"v" => instance_method(:do_v)
}
def interpret(string)
string.each_char {|b| Dispatcher[b].bind(self).call }
end
end
interpreter = Interpr......eter.new
interpreter.interpret('dave')
# => Hello there, Dave!
//}... -
Module
# private _ instance _ methods(inherited _ too = true) -> [Symbol] (12219.0) -
そのモジュールで定義されている private メソッド名 の一覧を配列で返します。
...private メソッド名
の一覧を配列で返します。
@param inherited_too false を指定するとそのモジュールで定義されているメソッドのみ返します。
@see Object#private_methods, Module#instance_methods
//emlist[例][ruby]{
module Foo
def foo; end
private d......ef bar; end
end
module Bar
include Foo
def baz; end
private def qux; end
end
Bar.private_instance_methods # => [:qux, :bar]
Bar.private_instance_methods(false) # => [:qux]
//}... -
Module
# public _ instance _ method(name) -> UnboundMethod (12219.0) -
self の public インスタンスメソッド name をオブジェクト化した UnboundMethod を返します。
...の public インスタンスメソッド name をオブジェクト化した UnboundMethod を返します。
@param name メソッド名を Symbol または String で指定します。
@raise NameError 定義されていないメソッド名や、
protected メソッド名、 private メ......として与えると発生します。
//emlist[例][ruby]{
Kernel.public_instance_method(:object_id) #=> #<UnboundMethod: Kernel#object_id>
Kernel.public_instance_method(:p) # method `p' for module `Kernel' is private (NameError)
//}
@see Module#instance_method,Object#public_method... -
Object
# instance _ of?(klass) -> bool (12219.0) -
オブジェクトがクラス klass の直接のインスタンスである時真を返します。
...。
obj.instance_of?(c) が成立する時には、常に obj.kind_of?(c) も成立します。
@param klass Classかそのサブクラスのインスタンスです。
//emlist[][ruby]{
class C < Object
end
class S < C
end
obj = S.new
p obj.instance_of?(S) # true
p obj.instance_of?(C)......# false
//}
@see Object#kind_of?,Object#class...