るりまサーチ (Ruby 2.6.0)

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

別のキーワード

  1. _builtin to_s
  2. openssl to_der
  3. openssl to_s
  4. _builtin to_a
  5. openssl to_pem

検索結果

Pathname#stat -> File::Stat (54724.0)

File.stat(self.to_s) と同じです。

File.stat(self.to_s) と同じです。


@see File.stat

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

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

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

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

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

//emlist[例][ruby...

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

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

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

自身のエンコードは UTF-8 であるべきです。
"\u????" のように UTF-16 ビッグエンディアンでエンコードされた文字列を返すことがあります。

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

//emlist[例][ruby]...

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

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

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

@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::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 (36625.0)

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

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

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

@param state_or_hash 生成する 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 (36625.0)

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

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

@param state_or_hash 生成する 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 (36625.0)

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

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

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

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

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

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

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

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

@param state_or_hash 生成する 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 (36625.0)

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

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

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

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

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

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

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

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

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

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

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

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

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

絞り込み条件を変える

RDoc::TopLevel#file_stat -> File::Stat (27658.0)

自身が管理するファイルに関する File::Stat オブジェクトを返します。

自身が管理するファイルに関する File::Stat オブジェクトを返します。

Process::Status#to_s -> String (27403.0)

to_i.to_s と同じです。

to_i.to_s と同じです。

RDoc::TopLevel#file_stat=(val) (27373.0)

自身が管理するファイルに関する File::Stat オブジェクトを設定しま す。

自身が管理するファイルに関する File::Stat オブジェクトを設定しま
す。

@param val File::Stat オブジェクトを指定します。

JSON::State#to_h -> Hash (27328.0)

自身をハッシュに変換します。

自身をハッシュに変換します。

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

json_state = JSON::State.new
pp json_state.to_h

# => {:indent=>"",
# :space=>"",
# :space_before=>"",
# :object_nl=>"",
# :array_nl=>"",
# :allow_nan=>false,
# :ascii_only=>false,
# :max_nesting=>100,
# ...

JSON::State#to_hash -> Hash (27328.0)

自身をハッシュに変換します。

自身をハッシュに変換します。

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

json_state = JSON::State.new
pp json_state.to_h

# => {:indent=>"",
# :space=>"",
# :space_before=>"",
# :object_nl=>"",
# :array_nl=>"",
# :allow_nan=>false,
# :ascii_only=>false,
# :max_nesting=>100,
# ...

絞り込み条件を変える

File::Stat#directory? -> bool (27322.0)

ディレクトリの時に真を返します。

ディレクトリの時に真を返します。

//emlist[][ruby]{
p File::Stat.new($0).directory? #=> false
//}

@see FileTest.#directory?

Process::Status#to_i -> Integer (27307.0)

C 言語での終了ステータス表現の整数を返します。

C 言語での終了ステータス表現の整数を返します。

多くのシステムの実装では、この値の上位 8 bit に exit(2)
に渡した終了ステータスが、下位 8 bit にシグナル等で終了した等の情
報が入っています。

Process::Status#stopped? -> bool (27304.0)

プロセスが現在停止(終了ではない)している場合に真を返します。 Process.#waitpid に Process::WUNTRACED フラグを設定した 場合にだけ真になりえます。

プロセスが現在停止(終了ではない)している場合に真を返します。
Process.#waitpid に Process::WUNTRACED フラグを設定した
場合にだけ真になりえます。

Process::Status#stopsig -> Integer | nil (27304.0)

stopped? が真の場合そのシグナルの番号を、そうでない場合は nil を返します。

stopped? が真の場合そのシグナルの番号を、そうでない場合は
nil を返します。

Pathname#lstat -> File::Stat (18655.0)

File.lstat(self.to_s) と同じです。

File.lstat(self.to_s) と同じです。


@see File.lstat

絞り込み条件を変える

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

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

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...

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

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

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...

Process::Status#>>(num) -> Integer (9070.0)

self.to_i >> num と同じです。

self.to_i >> num と同じです。

@param num 整数を指定します。

fork { exit 99 } #=> 26563
Process.wait #=> 26563
$?.to_i #=> 25344
$? >> 8 #=> 99

JSON::State#[]=(name, value) (9052.0)

Set the attribute name to value.

Set the attribute name to value.

JSON::State#buffer_initial_length=(length) (9052.0)

This sets the initial length of the buffer to length, if length > 0, otherwise its value isn't changed.

This sets the initial length of the buffer to length, if length > 0,
otherwise its value isn't changed.

絞り込み条件を変える

JSON::State#depth=(depth) (9052.0)

This sets the maximum level of data structure nesting in the generated JSON to the integer depth, max_nesting = 0 if no maximum should be checked.

This sets the maximum level of data structure nesting in the generated
JSON to the integer depth, max_nesting = 0 if no maximum should be
checked.

JSON::State#quirks_mode=(enable) (9052.0)

If set to true, enables the quirks_mode mode.

If set to true, enables the quirks_mode mode.

Process::Status#&(other) -> Integer (9052.0)

self.to_i & other と同じです。 このメソッドは後方互換性のためにあります。

self.to_i & other と同じです。
このメソッドは後方互換性のためにあります。

@param other 自身との & 演算をしたい整数を指定します。

File::Stat#atime -> Time (9040.0)

最終アクセス時刻を返します。

最終アクセス時刻を返します。

//emlist[][ruby]{
fs = File::Stat.new($0)
#例
p fs.atime.to_a #=> [45, 5, 21, 5, 9, 2007, 3, 248, false, "\223\214\213\236 (\225W\217\200\216\236) "]
//}

@see Time

File::Stat#ctime -> Time (9040.0)

最終状態変更時刻を返します。 (状態の変更とは chmod などによるもので、Unix では i-node の変更を意味します)

最終状態変更時刻を返します。
(状態の変更とは chmod などによるもので、Unix では i-node の変更を意味します)

//emlist[][ruby]{
fs = File::Stat.new($0)
#例
p fs.ctime.to_f #=> 1188719843.0
//}


@see Time

絞り込み条件を変える

Process::Status#==(other) -> bool (9022.0)

同じステータスの場合に真を返します。

同じステータスの場合に真を返します。

other が数値の場合、self.to_i との比較が行われます。こ
れは後方互換性のためです。

@param other 自身と比較したいオブジェクトを指定します。

Pathname#chown(owner, group) -> Integer (88.0)

File.chown(owner, group, self.to_s) と同じです。

File.chown(owner, group, self.to_s) と同じです。

@param owner オーナーを指定します。

@param group グループを指定します。

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

Pathname('testfile').stat.uid # => 501
Pathname('testfile').chown(502, 12)
Pathname('testfile').stat.uid # => 502
//}

@see File.chown, File#chown