るりまサーチ

最速Rubyリファレンスマニュアル検索!
300件ヒット [101-200件を表示] (0.027秒)

別のキーワード

  1. kernel require
  2. getoptlong require_order
  3. rubygems/custom_require require
  4. irb/ext/use-loader irb_require
  5. require execute

検索結果

<< < 1 2 3 > >>

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

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

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

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

false.to_json # => "false"
//}...

JSON::Generator::GeneratorMethods::Float#to_json(state_or_hash = nil) -> String (3007.0)

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

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

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

(1.0).to_json # => "1.0"
//}...

JSON::Generator::GeneratorMethods::Hash#to_json(state_or_hash = nil) -> String (3007.0)

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

...に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。

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

person = { "name" => "tanaka", "age" => 19 }
person.to_json # => "{\"name\":\"tanaka\",\"age\":19}"
//}...

JSON::Generator::GeneratorMethods::Integer#to_json(state_or_hash = nil) -> String (3007.0)

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

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

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

10.to_json # => "10"
//}...

JSON::Generator::GeneratorMethods::NilClass#to_json(state_or_hash = nil) -> String (3007.0)

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

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

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

nil.to_json # => "null"
//}...

絞り込み条件を変える

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

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

...スタンスか、
JSON::State.new の引数と同じ Hash を
指定します。

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

puts "test".to_json # => "test"
puts '"'.to_json # => "\""
puts "\\".to_json...

JSON::Generator::GeneratorMethods::String#to_json_raw_object -> Hash (3007.0)

生の文字列を格納したハッシュを生成します。

...成します。

このメソッドは UTF-8 の文字列ではなく生の文字列を JSON に変換する場合に使用してください。

require
'json'
"にほんご".encode("euc-jp").to_json_raw_object
# => {"json_class"=>"String", "raw"=>[164, 203, 164, 219, 164, 243, 164, 180]}
"...

JSON::Generator::GeneratorMethods::TrueClass#to_json(state_or_hash = nil) -> String (3007.0)

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

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

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

true.to_json # => "true"
//}...

Forwardable#def_delegator(accessor, method, ali = method) -> () (223.0)

メソッドの委譲先を設定します。

...

@param accessor 委譲先のオブジェクト

@param method 委譲先のメソッド

@param ali 委譲元のメソッド

委譲元のオブジェクトで ali が呼び出された場合に、
委譲先のオブジェクトの method へ処理が委譲されるようになります。

...
...ます。

//emlist[例][ruby]{
require
'forwardable'

class MyQueue
extend Forwardable
attr_reader :queue
def initialize
@queue = []
end

def_delegator :@queue, :push, :mypush
end

q = MyQueue.new
q.mypush 42
q.queue # => [42]
q.push 23 # => NoMethodError
//}

@see Forwardable#def...
<< < 1 2 3 > >>