るりまサーチ

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

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

検索結果

<< < 1 2 3 4 > >>

JSON::State#space_before=(string) (3013.0)

JSON 形式の文字列中で JavaScript のオブジェクトを表す部分にある ':' の 前に挿入する文字列をセットします。

...トします。

@
param string JSON 形式の文字列中で JavaScript のオブジェクトを表す部分にある ':' の
前に挿入する文字列をセットします。

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

json_state = JSON::State.new(space_before: "")
json_state.space_before...
...> ""
puts JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => [1,2,{"name":"tanaka","age":19}]

json_state.space_before = " "
json_state.space_before # => " "
puts JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => [1,2,{"name" :"tanaka","age" :19}]
//}...

Enumerator::Lazy#chunk(initial_state) {|elt, state| ... } -> Enumerator::Lazy (213.0)

Enumerable#chunk と同じですが、配列ではなく Enumerator::Lazy を返します。

...//emlist[例][ruby]{
1.step.lazy.chunk{ |n| n % 3 == 0 }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x007f8bf18118f0>:each>>

1.step.lazy.chunk{ |n| n % 3 == 0 }.take(5).force
# => [[false, [1, 2]], [true, [3]], [false, [4, 5]], [true, [6]], [false, [7, 8]]]
//}

@
see Enumerable...

Enumerator::Lazy#slice_before(initial_state) {|elt, state| bool } -> Enumerator::Lazy (213.0)

Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。

...//emlist[例][ruby]{
1.step.lazy.slice_before { |e| e.even? }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x00007f9f31844ce8>:each>>

1.step.lazy.slice_before { |e| e % 3 == 0 }.take(5).force
# => [[1, 2], [3, 4, 5], [6, 7, 8], [9, 10, 11], [12, 13, 14]]
//}

@
see Enumerable#sli...

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

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

...です。

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

//emlist[例][ruby]{
requir...
...e "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
//}...

Thread#report_on_exception=(newstate) (119.0)

真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。

...はスレッド作成時の Thread.report_on_exception です。

@
param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。

//emlist[例][ruby]{
a = Thread.new{ Thread.stop; raise }
a.report_on_exception = true...
...# => true
a.run
# => #<Thread:0x00007fc3f48c7908@(irb):1 run> terminated with exception (report_on_exception is true):
# Traceback (most recent call last):
# (irb):1:in `block in irb_binding': unhandled exception
# #<Thread:0x00007fc3f48c7908@(irb):1 dead>
b = Thread.new{ Thread.stop; raise...
...}
b.report_on_exception = false
b.run # => #<Thread:0x00007fc3f48aefc0@(irb):4 dead>
//}

@
see Thread.report_on_exception...

絞り込み条件を変える

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

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

...ます。

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

//emlist[例][ruby]{
requir...

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

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

...ます。

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

//emlist[例][ruby]{
requir...

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

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

...ます。

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

//emlist[例][ruby]{
requir...

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

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

...ます。

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

//emlist[例][ruby]{
requir...

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

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

...ます。

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

//emlist[例][ruby]{
requir...

絞り込み条件を変える

<< < 1 2 3 4 > >>