別のキーワード
ライブラリ
- ビルトイン (745)
- delegate (48)
- erb (12)
-
irb
/ output-method (36) - json (60)
-
minitest
/ spec (1) -
minitest
/ unit (1) - psych (8)
-
rdoc
/ code _ object (12) - win32ole (348)
クラス
- Array (10)
- BasicObject (72)
- Delegator (48)
- ERB (12)
- Enumerator (48)
-
Enumerator
:: Lazy (48) -
IRB
:: OutputMethod (36) -
JSON
:: State (24) - Method (92)
- Module (152)
- NameError (24)
- NoMethodError (12)
- Object (217)
- Proc (12)
-
RDoc
:: CodeObject (12) - Regexp (24)
- Thread (12)
- TracePoint (7)
- UnboundMethod (24)
- WIN32OLE (36)
-
WIN32OLE
_ METHOD (204) -
WIN32OLE
_ PARAM (84) -
WIN32OLE
_ TYPE (24)
モジュール
キーワード
- === (8)
- [] (36)
-
_ getproperty (12) -
_ invoke (12) - args (12)
-
assert
_ respond _ to (1) -
bind
_ call (12) - call (24)
-
class
_ exec (12) -
def
_ class (12) - default (12)
-
default
_ event _ sources (12) -
define
_ singleton _ method (24) - dig (10)
- dispid (12)
- each (48)
-
enum
_ for (48) - event? (12)
-
event
_ interface (12) - generate (12)
- helpcontext (12)
- helpfile (12)
- input? (12)
- inspect (12)
-
instance
_ eval (24) -
instance
_ method (12) -
instance
_ methods (12) - invkind (12)
-
invoke
_ kind (12) - match (24)
- method (12)
-
method
_ missing (36) - methods (24)
-
module
_ exec (12) -
must
_ respond _ to (1) - name (36)
-
offset
_ vtbl (12) -
ole
_ methods (12) -
ole
_ type (12) -
ole
_ type _ detail (12) - optional? (12)
- parameters (43)
- params (12)
- pp (12)
- ppx (12)
-
private
_ instance _ methods (12) -
private
_ methods (12) -
protected
_ instance _ methods (12) -
protected
_ methods (24) -
psych
_ yaml _ as (4) - public (48)
-
public
_ instance _ method (12) -
public
_ instance _ methods (12) -
public
_ method (12) -
public
_ methods (24) - puts (12)
- receiver (12)
-
remove
_ methods _ etc (12) -
respond
_ to? (12) -
respond
_ to _ missing? (12) -
return
_ type (12) -
return
_ type _ detail (12) -
return
_ vtype (12) - send (24)
-
singleton
_ method (12) -
singleton
_ method _ added (12) -
singleton
_ method _ undefined (12) -
singleton
_ methods (12) -
size
_ opt _ params (12) -
size
_ params (12) -
to
_ enum (48) -
to
_ json (12) -
to
_ json _ raw (12) -
to
_ json _ raw _ object (12) -
to
_ s (48) - visible? (12)
-
yaml
_ as (4)
検索結果
先頭5件
- Module
# private _ instance _ methods(inherited _ too = true) -> [Symbol] - Module
# protected _ instance _ methods(inherited _ too = true) -> [Symbol] - Module
# public _ instance _ methods(inherited _ too = true) -> [Symbol] - JSON
:: Generator :: GeneratorMethods :: Object # to _ json(state _ or _ hash = nil) -> String - BasicObject
# instance _ eval {|obj| . . . } -> object
-
Module
# private _ instance _ methods(inherited _ too = true) -> [Symbol] (6107.0) -
そのモジュールで定義されている private メソッド名 の一覧を配列で返します。
...ます。
@see Object#private_methods, Module#instance_methods
//emlist[例][ruby]{
module Foo
def foo; end
private def 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) # => [:q... -
Module
# protected _ instance _ methods(inherited _ too = true) -> [Symbol] (6107.0) -
そのモジュールで定義されている protected メソッド名 の一覧を配列で返します。
...そのモジュールで定義されている protected メソッド名
の一覧を配列で返します。
@param inherited_too false を指定するとそのモジュールで定義されているメソッドのみ返します。
@see Object#protected_methods, Module#instance_methods... -
Module
# public _ instance _ methods(inherited _ too = true) -> [Symbol] (6107.0) -
そのモジュールで定義されている public メソッド名 の一覧を配列で返します。
...そのモジュールで定義されている public メソッド名
の一覧を配列で返します。
@param inherited_too false を指定するとそのモジュールで定義されているメソッドのみ返します。
@see Object#public_methods, Module#instance_methods... -
JSON
:: Generator :: GeneratorMethods :: Object # to _ json(state _ or _ hash = nil) -> String (6013.0) -
自身を to_s で文字列にした結果を JSON 形式の文字列に変換して返します。
...ruby]{
require "json"
class Person
attr :name, :age
def initialize(name, age)
@name, @age = name, age
end
end
tanaka = Person.new("tanaka", 29)
tanaka.to_json # => "\"#<Person:0x00007ffdec0167c8>\""
tanaka.method(:to_json).owner # => JSON::Ext::Generator::GeneratorMethods::Object
//}... -
BasicObject
# instance _ eval {|obj| . . . } -> object (3121.0) -
オブジェクトのコンテキストで文字列 expr またはオブジェクト自身をブロックパラメータとするブロックを 評価してその結果を返します。
.../def#nest_method を参照してください。
BasicObject を継承して作ったクラス内で instance_eval する場合はトップレベルの定数や Kernel モジュールに定義されているメソッドは見えません。
これは、トップレベルの定数が Object 以下に......imeError)
//}
//emlist[例][ruby]{
class Bar < BasicObject
def call1
instance_eval("::ENV.class")
end
def call2
instance_eval("ENV.class")
end
end
bar = Bar.new
bar.call1 # => Object
bar.call2 # raise NameError
//}
@see Module#module_eval, Kernel.#eval, BasicObject#instance_exec... -
BasicObject
# instance _ eval(expr , filename = "(eval)" , lineno = 1) -> object (3121.0) -
オブジェクトのコンテキストで文字列 expr またはオブジェクト自身をブロックパラメータとするブロックを 評価してその結果を返します。
.../def#nest_method を参照してください。
BasicObject を継承して作ったクラス内で instance_eval する場合はトップレベルの定数や Kernel モジュールに定義されているメソッドは見えません。
これは、トップレベルの定数が Object 以下に......imeError)
//}
//emlist[例][ruby]{
class Bar < BasicObject
def call1
instance_eval("::ENV.class")
end
def call2
instance_eval("ENV.class")
end
end
bar = Bar.new
bar.call1 # => Object
bar.call2 # raise NameError
//}
@see Module#module_eval, Kernel.#eval, BasicObject#instance_exec... -
UnboundMethod
# bind _ call(recv , *args) -> object (3115.0) -
self を recv に bind して args を引数として呼び出します。
...self を recv に bind して args を引数として呼び出します。
self.bind(recv).call(*args) と同じ意味です。
//emlist[][ruby]{
puts Kernel.instance_method(:inspect).bind_call(BasicObject.new) # => #<BasicObject:0x000055c65e8ea7b8>
//}
@see UnboundMethod#bind, Method#call... -
UnboundMethod
# bind _ call(recv , *args) { . . . } -> object (3115.0) -
self を recv に bind して args を引数として呼び出します。
...self を recv に bind して args を引数として呼び出します。
self.bind(recv).call(*args) と同じ意味です。
//emlist[][ruby]{
puts Kernel.instance_method(:inspect).bind_call(BasicObject.new) # => #<BasicObject:0x000055c65e8ea7b8>
//}
@see UnboundMethod#bind, Method#call... -
NoMethodError
# args -> [object] (3114.0) -
メソッド呼び出しに使われた引数を配列で返します。
...メソッド呼び出しに使われた引数を配列で返します。
例:
begin
foobar(1,2,3)
rescue NoMethodError
p $!
p $!.name
p $!.args
end
# => #<NoMethodError: undefined method `foobar' for main:Object>
:foobar
[1, 2, 3]... -
UnboundMethod
# parameters -> [object] (3114.0) -
UnboundMethod オブジェクトの引数の情報を返します。
...UnboundMethod オブジェクトの引数の情報を返します。
詳しくは Method#parameters を参照してください。
@see Proc#parameters, Method#parameters... -
IRB
:: OutputMethod # pp(*objs) -> object (3102.0) -
各 obj を inspect した文字列を self に出力し、最後に改行を出力します。
各 obj を inspect した文字列を self に出力し、最後に改行を出力します。
@param objs 任意のオブジェクトを指定します。