るりまサーチ

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

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. matrix t
  4. t61string new
  5. fiddle type_size_t

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 3 > >>

Tracer.stdout -> object (24202.0)

トレース出力先を参照します。

トレース出力先を参照します。

Tracer.stdout=(fp) (12208.0)

トレース出力先を変更します。

...トレース出力先を変更します。

@param fp 新しいトレース出力先を指定します。

require 'tracer'

fp = File.open('temptrace.txt', "w")
T
racer.stdout = fp
T
racer.on {
puts "Hello"
}
fp.close...

Tracer.stdout_mutex -> Mutex (12202.0)

@todo

...@todo...

CSV.instance(data = $stdout, options = Hash.new) -> CSV (6303.0)

このメソッドは CSV.new のように CSV のインスタンスを返します。 しかし、返される値は Object#object_id と与えられたオプションを キーとしてキャッシュされます。

...返される値は Object#object_id と与えられたオプションを
キーとしてキャッシュされます。

ブロックが与えられた場合、生成されたインスタンスをブロックに渡して評価した
結果を返します。

@param data String か IO のインスタ...
...aram options CSV.new のオプションと同じオプションを指定できます。

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

options = { headers: true }

t
ext =<<-EOS
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS

csv = CSV.instance(text, options)
c...
...sv2 = CSV.instance(text, options)
csv.object_id == csv2.object_id # => true
print csv.read

# => id,first name,last name,age
# 1,taro,tanaka,20
# 2,jiro,suzuki,18
# 3,ami,sato,19
# 4,yumi,adachi,21
//}

@see CSV.new...

CSV.instance(data = $stdout, options = Hash.new) {|csv| ... } -> object (6303.0)

このメソッドは CSV.new のように CSV のインスタンスを返します。 しかし、返される値は Object#object_id と与えられたオプションを キーとしてキャッシュされます。

...返される値は Object#object_id と与えられたオプションを
キーとしてキャッシュされます。

ブロックが与えられた場合、生成されたインスタンスをブロックに渡して評価した
結果を返します。

@param data String か IO のインスタ...
...aram options CSV.new のオプションと同じオプションを指定できます。

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

options = { headers: true }

t
ext =<<-EOS
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS

csv = CSV.instance(text, options)
c...
...sv2 = CSV.instance(text, options)
csv.object_id == csv2.object_id # => true
print csv.read

# => id,first name,last name,age
# 1,taro,tanaka,20
# 2,jiro,suzuki,18
# 3,ami,sato,19
# 4,yumi,adachi,21
//}

@see CSV.new...

絞り込み条件を変える

GC::Profiler.report(out = $stdout) -> nil (6208.0)

GC::Profiler.result の結果を out に出力します。

...lt の結果を out に出力します。

@param out 結果の出力先を指定します。デフォルトは $stdout です。

//emlist[例][ruby]{
GC::Profiler.enable
GC.start
GC::Profiler.report

# => GC 4 invokes.
# Index Invoke Time(sec) Use Size(byte) Total Size(byte) T...
...otal Object GC Time(ms)
# 1 0.019 303720 1269840 31746 1.25899999999999967493
//}

@see GC::Profiler.result...

Object.yaml_tag(tag) -> () (6207.0)

クラスと tag の間を関連付けます。

...クラスと tag の間を関連付けます。

これによって tag 付けされた YAML ドキュメントを Ruby のオブジェクトに
変換したりその逆をしたりすることができます。

@param tag 対象のクラスに関連付けるタグの文字列

=== Example
requir...
...Foo
def initialize(x)
@x = x
end

attr_reader :x
end

# Dumps Ruby object normally
p Psych.dump(Foo.new(3))
# =>
# --- !ruby/object:Foo
# x: 3

# Registers tag with class Foo
Foo.yaml_as("tag:example.com,2013:foo")
# ... and dumps the object of Foo class...
...Psych.dump(Foo.new(3), STDOUT)
# =>
# --- !<tag:example.com,2013:foo>
# x: 3

# Loads the object from the tagged YAML node
p Psych.load(<<EOS)
--- !<tag:example.com,2012:foo>
x: 8
EOS
# => #<Foo:0x0000000130f48 @x=8>...

IO.try_convert(obj) -> IO | nil (6119.0)

obj を to_io メソッドによって IO オブジェクトに変換します。 変換できなかった場合は nil を返します。

...obj を to_io メソッドによって IO オブジェクトに変換します。
変換できなかった場合は nil を返します。

IO.try_convert(STDOUT) # => STDOUT
IO.try_convert("STDOUT") # => nil...

Net::HTTP.get_print(host, path, port = 80) -> () (6117.0)

指定した対象から HTTP でエンティティボディを取得し、 $stdout に出力します。

...対象から HTTP でエンティティボディを取得し、
$stdout に出力します。

対象の指定方法は URI で指定するか、
(host, path, port) で指定するかのいずれかです。

@param uri データの取得対象を URI で指定します。
@param host 接続先の...
...
@param path データの存在するパスを文字列で指定します。
@param port 接続するポートを整数で指定します。
@see Net::HTTP.get

=== 例

//emlist[][ruby]{
require 'net/http'
require 'uri'
Net::HTTP.get_print URI.parse('http://www.example.com/index.html')
//}

...
...しくは

//emlist[][ruby]{
require 'net/http'
Net::HTTP.get_print 'www.example.com', '/index.html'
//}...
<< 1 2 3 > >>