492件ヒット
[1-100件を表示]
(0.122秒)
ライブラリ
- ビルトイン (180)
- delegate (36)
- forwardable (48)
- json (120)
-
rdoc
/ code _ object (12) -
rdoc
/ context (12) -
rdoc
/ stats (12) - win32ole (72)
クラス
- Delegator (36)
- Module (60)
- Object (96)
-
RDoc
:: CodeObject (12) -
RDoc
:: Context (12) -
RDoc
:: Stats (12) - WIN32OLE (48)
-
WIN32OLE
_ TYPE (24)
モジュール
- Enumerable (24)
- Forwardable (24)
-
JSON
:: Generator :: GeneratorMethods :: Array (12) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (12) -
JSON
:: Generator :: GeneratorMethods :: Float (12) -
JSON
:: Generator :: GeneratorMethods :: Hash (12) -
JSON
:: Generator :: GeneratorMethods :: Integer (12) -
JSON
:: Generator :: GeneratorMethods :: NilClass (12) -
JSON
:: Generator :: GeneratorMethods :: Object (12) -
JSON
:: Generator :: GeneratorMethods :: String (24) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (12) - SingleForwardable (24)
キーワード
-
def
_ delegators (24) -
def
_ instance _ delegators (12) -
def
_ single _ delegators (12) -
default
_ event _ sources (12) -
document
_ self= (12) - grep (24)
-
initialize
_ copy (12) -
instance
_ methods (12) -
num
_ methods= (12) -
ole
_ func _ methods (12) -
ole
_ get _ methods (12) -
ole
_ methods (24) -
ole
_ put _ methods (12) -
private
_ instance _ methods (12) -
private
_ methods (12) -
protected
_ instance _ methods (12) -
protected
_ methods (24) -
public
_ instance _ methods (12) -
public
_ methods (24) - send (24)
-
set
_ visibility _ for (12) -
singleton
_ methods (12) -
to
_ json (108) -
to
_ json _ raw (12) -
undef
_ method (12)
検索結果
先頭5件
-
Object
# methods(include _ inherited = true) -> [Symbol] (24310.0) -
そのオブジェクトに対して呼び出せるメソッド名の一覧を返します。 このメソッドは public メソッドおよび protected メソッドの名前を返します。
...および protected メソッドの名前を返します。
ただし特別に、引数が偽の時は Object#singleton_methods(false) と同じになっています。
@param include_inherited 引数が偽の時は Object#singleton_methods(false) と同じになります。
//emlist[例1][ruby]......nt
private; def private_parent() end
protected; def protected_parent() end
public; def public_parent() end
end
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......ivate_singleton() end
protected; def protected_singleton() end
public; def public_singleton() end
end
# あるオブジェクトの応答できるメソッドの一覧を得る。
p obj.methods(false)
p obj.public_methods(false)
p obj.private_methods(false)
p obj.protected_methods(f... -
Delegator
# methods -> [Symbol] (24214.0) -
そのオブジェクトに対して呼び出せるメソッド名の一覧を返します。 このメソッドは public メソッドおよび protected メソッドの名前を返します。
...そのオブジェクトに対して呼び出せるメソッド名の一覧を返します。
このメソッドは public メソッドおよび protected メソッドの名前を返します。
@see Object#methods... -
Module
# protected _ instance _ methods(inherited _ too = true) -> [Symbol] (18426.0) -
そのモジュールで定義されている protected メソッド名 の一覧を配列で返します。
...そのモジュールで定義されている protected メソッド名
の一覧を配列で返します。
@param inherited_too false を指定するとそのモジュールで定義されているメソッドのみ返します。
@see Object#protected_methods, Module#instance_methods... -
Object
# protected _ methods(include _ inherited = true) -> [Symbol] (15432.0) -
そのオブジェクトが理解できる protected メソッド名の一覧を返します。
...解できる protected メソッド名の一覧を返します。
@param include_inherited 偽となる値を指定すると自身のクラスのスーパークラスで定義されたメソッドを除きます。
@see Module#protected_instance_methods,Object#methods,Object#singleton_methods... -
Delegator
# protected _ methods(all = true) -> [Symbol] (15320.0) -
そのオブジェクトが理解できる protected メソッド名の一覧を返します。
...そのオブジェクトが理解できる protected メソッド名の一覧を返します。
@param all 偽を指定すると __getobj__ のスーパークラスで定義されたメソッドを除きます。
@see Object#protected_methods... -
JSON
:: Generator :: GeneratorMethods :: Object # to _ json(state _ or _ hash = nil) -> String (15119.0) -
自身を to_s で文字列にした結果を JSON 形式の文字列に変換して返します。
...自身を to_s で文字列にした結果を JSON 形式の文字列に変換して返します。
このメソッドはあるオブジェクトに to_json メソッドが定義されていない場合に使用する
フォールバックのためのメソッドです。
@param state_or_hash 生......State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
class Person
attr :name, :age
def initialize(name, age)
@name, @age = name, age
end
end
tanaka = Person.new("ta......naka", 29)
tanaka.to_json # => "\"#<Person:0x00007ffdec0167c8>\""
tanaka.method(:to_json).owner # => JSON::Ext::Generator::GeneratorMethods::Object
//}... -
JSON
:: Generator :: GeneratorMethods :: Array # to _ json(state _ or _ hash = nil) -> String (15107.0) -
自身から生成した JSON 形式の文字列を返します。
...します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
req......uire "json"
[1, 2, 3].to_json # => "[1,2,3]"
//}... -
JSON
:: Generator :: GeneratorMethods :: FalseClass # to _ json(state _ or _ hash = nil) -> String (15107.0) -
自身から生成した JSON 形式の文字列を返します。
...します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
req......uire "json"
false.to_json # => "false"
//}... -
JSON
:: Generator :: GeneratorMethods :: Float # to _ json(state _ or _ hash = nil) -> String (15107.0) -
自身から生成した JSON 形式の文字列を返します。
...します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
req......uire "json"
(1.0).to_json # => "1.0"
//}...