るりまサーチ

最速Rubyリファレンスマニュアル検索!
1400件ヒット [1-100件を表示] (0.043秒)
トップページ > クエリ:j[x] > クエリ:method[x]

別のキーワード

  1. encoding windows_31j
  2. _builtin windows_31j
  3. _builtin cswindows31j
  4. encoding cswindows31j
  5. json j

ライブラリ

クラス

検索結果

<< 1 2 3 ... > >>

Object#method(name) -> Method (21248.0)

オブジェクトのメソッド name をオブジェクト化した Method オブジェクトを返します。

...した
Method
オブジェクトを返します。

@param name メソッド名をSymbol またはStringで指定します。
@raise NameError 定義されていないメソッド名を引数として与えると発生します。

//emlist[][ruby]{
me = -365.method(:abs)
p me #=> #<Method: Integer#...
...abs>
p me.call #=> 365
//}

@see Module#instance_method, Method, BasicObject#__send__, Object#send, Kernel.#eval, Object#singleton_method...

VALUE rb_obj_singleton_methods(int argc, VALUE *argv, VALUE obj) (12200.0)

Object#singleton_methods の実体。 オブジェクト obj に定義されている特異メソッド名のリストを 文字列の配列で返す。

...Object#singleton_methods の実体。
オブジェクト obj に定義されている特異メソッド名のリストを
文字列の配列で返す。...

static VALUE rb_obj_method(VALUE obj, VALUE vid) (12200.0)

static VALUE rb_obj_methods(VALUE obj) (12200.0)

Object#methods の実体です。

...Object#methods の実体です。...

static VALUE rb_obj_private_methods(VALUE obj) (12200.0)

Object#private_methods の実体です。

...Object#private_methods の実体です。...

絞り込み条件を変える

static VALUE rb_obj_protected_methods(VALUE obj) (12200.0)

Object#protected_methods の実体です。

...Object#protected_methods の実体です。...

JSON::Generator::GeneratorMethods::Object#to_json(state_or_hash = nil) -> String (12106.0)

自身を to_s で文字列にした結果を JSON 形式の文字列に変換して返します。

...にした結果を JSON 形式の文字列に変換して返します。

このメソッドはあるオブジェクトに to_json メソッドが定義されていない場合に使用する
フォールバックのためのメソッドです。

@param state_or_hash 生成する JSON 形式の文...
...列をカスタマイズするため
JSON::State のインスタンスか、
J
SON::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("tanaka", 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 (12100.0)

自身から生成した JSON 形式の文字列を返します。

...自身から生成した JSON 形式の文字列を返します。

@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
JSON::State のインスタンスか、
J
SON::State.new の引数と同じ Hash を...
...指定します。

//emlist[例][ruby]{
require "json"

[1, 2, 3].to_json # => "[1,2,3]"
//}...

JSON::Generator::GeneratorMethods::FalseClass#to_json(state_or_hash = nil) -> String (12100.0)

自身から生成した JSON 形式の文字列を返します。

...ら生成した JSON 形式の文字列を返します。

"false" という文字列を返します。

@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
JSON::State のインスタンスか、
J
SON::State.new...
...の引数と同じ Hash を
指定します。

//emlist[例][ruby]{
require "json"

false.to_json # => "false"
//}...
<< 1 2 3 ... > >>