るりまサーチ

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

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. csv to_i
  5. kernel $-i

ライブラリ

クラス

モジュール

検索結果

<< 1 2 > >>

Benchmark::Tms#format(fmtstr = nil, *args) -> String (18225.0)

self を指定されたフォーマットで整形して返します。

...rnel.#format のようにオブジェクトを整形しますが、
以下の拡張を使用することができます。

: %u
user CPU time で置き換えられます。Benchmark::Tms#utime
: %y
system CPU time で置き換えられます(Mnemonic: y of "s*y*stem")。Benchmark::Tms#stime
: %...
...U
子プロセスの user CPU time で置き換えられます。Benchmark::Tms#cutime
: %Y
子プロセスの system CPU time で置き換えられます。Benchmark::Tms#cstime
: %t
total CPU time で置き換えられます。Benchmark::Tms#total
: %r
実経過時間で置き換えられ...
...Benchmark::Tms#real
: %n
ラベルで置き換えられます(Mnemonic: n of "*n*ame")。Benchmark::Tms#label

@param fmtstr フォーマット文字列です。
省略された場合は、Benchmark::Tms::FORMAT が使用されます。
@param args フォーマットされる引数...

Time#strftime(format) -> String (9295.0)

時刻を format 文字列に従って文字列に変換した結果を返します。

...時刻を format 文字列に従って文字列に変換した結果を返します。

@param format フォーマット文字列を指定します。使用できるものは 以下の通りです。

* %A: 曜日の名称(Sunday, Monday ... )
* %a: 曜日の省略名(Sun, Mon ... )
* %B: 月...
...角空白で埋める ( 1..31)
* %F: %Y-%m-%d と同等 (ISO 8601の日付フォーマット)
* %G: ISO 8601の暦週の年
* %g: ISO 8601の暦週の年の下2桁(00-99)
* %H: 24時間制の時(00-23)
* %h: %b と同等
* %I: 12時間制の時(01-12)
* %j: 年中の通算日(001-366)...
...ftime("%H%M%S%z") # => 040506+0900 Local time and the difference from UTC (basic)
p t.strftime("%T%:z") # => 04:05:06+09:00 Local time and the difference from UTC (extended)
p t.strftime("%Y%m%dT%H%M%S%z") # => 20010203T040506+0900 Date and time of d...

Benchmark::FORMAT -> String (6219.0)

Benchmark.#benchmark の第三引数のデフォルト値。

...r CPU time で置き換えられます。Benchmark::Tms#utime
: %y
system CPU time で置き換えられます(Mnemonic: y of "s*y*stem")。Benchmark::Tms#stime
: %U
子プロセスの user CPU time で置き換えられます。Benchmark::Tms#cutime
: %Y
子プロセスの system CPU time で...
...置き換えられます。Benchmark::Tms#cstime
: %t
total CPU time で置き換えられます。Benchmark::Tms#total
: %r
実経過時間で置き換えられます。Benchmark::Tms#real
: %n
ラベルで置き換えられます(Mnemonic: n of "*n*ame")。Benchmark::Tms#label

上記のフ...
...ォーマット文字列を使用しています。
この定数の内容は以下の通りです。

//emlist[][ruby]{
"%10.6u %10.6y %10.6t %10.6r\n"
//}

@see Benchmark.#benchmark, Benchmark::Tms::FORMAT...

Benchmark::Tms::FORMAT -> String (6219.0)

Benchmark.#benchmark の第三引数のデフォルト値。

...r CPU time で置き換えられます。Benchmark::Tms#utime
: %y
system CPU time で置き換えられます(Mnemonic: y of "s*y*stem")。Benchmark::Tms#stime
: %U
子プロセスの user CPU time で置き換えられます。Benchmark::Tms#cutime
: %Y
子プロセスの system CPU time で...
...置き換えられます。Benchmark::Tms#cstime
: %t
total CPU time で置き換えられます。Benchmark::Tms#total
: %r
実経過時間で置き換えられます。Benchmark::Tms#real
: %n
ラベルで置き換えられます(Mnemonic: n of "*n*ame")。Benchmark::Tms#label

上記のフ...
...ォーマット文字列を使用しています。
この定数の内容は以下の通りです。

//emlist[][ruby]{
"%10.6u %10.6y %10.6t %10.6r\n"
//}

@see Benchmark.#benchmark, Benchmark::FORMAT...

net/imap (6036.0)

このライブラリは Internet Message Access Protocol (IMAP) の クライアントライブラリです。2060 を元に 実装されています。

...リは Internet Message Access Protocol (IMAP) の
クライアントライブラリです。2060 を元に
実装されています。

=== IMAP の概要

I
MAPを利用するには、まずサーバに接続し、
Net::IMAP#authenticate もしくは
Net::IMAP#login で認証します。
I
MAP で...
...るため、IMAPクラスのメソッドは
Socket 関連のエラーが発生するかもしれません。例えば、
通信中に接続が切れると Errno::EPIPE 例外が
発生します。詳しくは Socket などを見てください。

Net::IMAP::DataFormatError、
Net::IMAP::ResponsePar...
...ザのためこれを
Net::IMAP#responses に記録しておきます。

=== References

* [IMAP]
M. Crispin, "INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1",
RFC 2060, December 1996.

* [LANGUAGE-TAGS]
Alvestrand, H., "Tags for the Identification of
Languages", RFC 1766, Mar...

絞り込み条件を変える

Marshal フォーマット (3198.0)

Marshal フォーマット フォーマットバージョン 4.8 を元に記述しています。

...l フォーマット
フォーマットバージョン 4.8 を元に記述しています。

=== nil, true, false

それぞれ、'0', 'T', 'F' になります。

//emlist[][ruby]{
p Marshal.dump(nil).unpack1("x2 a*") # => "0"
p Marshal.dump(true).unpack1("x2 a*") # => "T"
p Marshal.dump(false...
...*") # => ["i", 2, 0, 1]
p foo(2, 0, 1) # => 256
//}

Ruby 1.9.3 以前では、インスタンス変数を設定しても dump されません。
Ruby 2.0 以降は freeze されているので、インスタンス変数は設定できません。

=== instance of the user c...
...w([nil])).unpack("x2 a a c a3 aca*")
# => ["C", ":", 8, "Foo", "[", 6, "0"]
# ^^^ (or '"', '/', '{')
//}

==== String, Regexp, Array, Hash のサブクラス (インスタンス変数あり)

'I' で始まるデータ構造になります。
d:marshal_format#instance_variable...

Time.rfc2822(date) -> Time (3112.0)

2822で定義されているdate-timeとしてdateをパースして Timeオブジェクトに変換します。 この形式は822で定義されて1123で更新された形式と 同じです。

...2822で定義されているdate-timeとしてdateをパースして
Timeオブジェクトに変換します。
この形式は822で定義されて1123で更新された形式と
同じです。

dateが2822に準拠していない、または
Timeクラスが指定された日時を表現でき...
...Timeクラスが指定された日時を表現できないときに
発生します。

使用例
require 'time'

rfc2822_time = 'Sun, 31 Aug 2008 12:08:19 +0900'
t = Time.rfc2822(rfc2822_time)
p t.kind_of?(Time) #=> true
non_rfc2822_time = 'Sun 31 Aug...
...2008 12:08:19 +0900'

begin
p Time.rfc2822(non_rfc2822_time)
rescue ArgumentError => err
puts "format err: #{err}"
end...

Time.rfc822(date) -> Time (3112.0)

2822で定義されているdate-timeとしてdateをパースして Timeオブジェクトに変換します。 この形式は822で定義されて1123で更新された形式と 同じです。

...2822で定義されているdate-timeとしてdateをパースして
Timeオブジェクトに変換します。
この形式は822で定義されて1123で更新された形式と
同じです。

dateが2822に準拠していない、または
Timeクラスが指定された日時を表現でき...
...Timeクラスが指定された日時を表現できないときに
発生します。

使用例
require 'time'

rfc2822_time = 'Sun, 31 Aug 2008 12:08:19 +0900'
t = Time.rfc2822(rfc2822_time)
p t.kind_of?(Time) #=> true
non_rfc2822_time = 'Sun 31 Aug...
...2008 12:08:19 +0900'

begin
p Time.rfc2822(non_rfc2822_time)
rescue ArgumentError => err
puts "format err: #{err}"
end...

ruby 1.8.4 feature (228.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...
# * [api]: 拡張ライブラリ API
# * [lib]: ライブラリ
* レベル
* [bug]: バグ修正
* [new]: 追加されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど
* 互換性のある変更
* only backward-compatibility
* 影...
..., expecting $end

#Tue Nov 1 14:20:11 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
#
# * eval.c (rb_call_super): should call method_missing if super is
# called from Kernel method.
#
# * eval.c (exec_under): frame during eval should preserve external
# information.

:...
...647 です。
# -e:1:in `printf': width too big (ArgumentError)

: Hash [bug]

#Wed Nov 23 03:40:49 2005 Guy Decoux <ts@moulon.inra.fr>
#
# * re.c (KR_REHASH): should cast to unsigned for 64bit CPU.
# [ruby-core:06721]

sizeof(long) > sizeof(int) な環境で、ハッシ...

NEWS for Ruby 3.0.0 (210.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to autosplatting. This now matches the behavior of Procs
accepting...
...single rest argument and no keywords.
16166

//emlist[][ruby]{
pr = proc{|*a, **kw| [a, kw]}

pr.call([1])
# 2.7 => [[1], {}]
# 3.0 => [[[1]], {}]

pr.call([1, {a: 1}])
# 2.7 => [[1], {:a=>1}] # and deprecation warning
# 3.0 => a=>1}, {}]
//}

* Arguments forwarding (`...`) now supports leadin...
...view interface [EXPERIMENTAL]
* The memory view interface is a C-API set to exchange a raw memory area, such as a numeric array or a bitmap image, between extension libraries. The extension libraries can share also the metadata of the memory area that consists of the shape, the element format,...

絞り込み条件を変える

<< 1 2 > >>