るりまサーチ

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

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

キーワード

検索結果

CSV (85.0)

このクラスは CSV ファイルやデータに対する完全なインターフェイスを提供します。

...へ書き込み
CSV.open("path/to/file.csv", "wb") do |csv|
csv << ["row", "of", "CSV", "data"]
csv << ["another", "row"]
# ...
end

# 文字列へ書き込み
csv_string = CSV.generate do |csv|
csv << ["row", "of", "CSV", "data"]
csv << ["another", "row"]
# ...
end
//}

=== 一行変換...
...works in the Encoding of the IO
or String object being read from or written to. Your data is never transcoded
(unless you ask Ruby to transcode it for you) and will literally be parsed in
the Encoding it is in. Thus CSV will return Arrays or Rows of Strings in the
Encoding of your data. This is...
...accomplished by transcoding the parser itself
into your Encoding.

Some transcoding must take place, of course, to accomplish this multiencoding
support. For example, <tt>:col_sep</tt>, <tt>:row_sep</tt>, and
<tt>:quote_char</tt> must be transcoded to match your data. Hopefully this
makes the enti...

Digest::SHA1 (49.0)

NIST (the US' National Institute of Standards and Technology) の SHA-1 Secure Hash Algorithmを実装するクラスです。 FIPS PUB 180-1に記述されています。

...NIST (the US' National Institute of Standards and Technology) の
SHA-1 Secure Hash Algorithmを実装するクラスです。
FIPS PUB 180-1に記述されています。...

Digest::SHA256 (49.0)

FIPS PUB 180-2に記述されているNIST (the US' National Institute of Standards and Technology) の SHA-256 Secure Hash Algorithmを 実装するクラスです。

...FIPS PUB 180-2に記述されているNIST (the US' National Institute of
Standards and Technology) の SHA-256 Secure Hash Algorithmを
実装するクラスです。...

Digest::SHA384 (49.0)

FIPS PUB 180-2に記述されているNIST (the US' National Institute of Standards and Technology) の SHA-384 Secure Hash Algorithmを 実装するクラスです。

...FIPS PUB 180-2に記述されているNIST (the US' National Institute of
Standards and Technology) の SHA-384 Secure Hash Algorithmを
実装するクラスです。...

Digest::SHA512 (49.0)

FIPS PUB 180-2に記述されているNIST (the US' National Institute of Standards and Technology) の SHA-512 Secure Hash Algorithmを 実装するクラスです。

...FIPS PUB 180-2に記述されているNIST (the US' National Institute of
Standards and Technology) の SHA-512 Secure Hash Algorithmを
実装するクラスです。...

絞り込み条件を変える

WIN32OLE_TYPELIB (37.0)

OLEオートメーションサーバの型情報ライブラリ(TypeLib)を操作するための クラスです。

...

require 'win32ole'

tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 14.0 Object Library')
puts "Guid of Excel typelib = #{tlib.guid}"
puts "version = #{tlib.major_version}.#{tlib.minor_version}"
puts "creatable classes:"
tlib.ole_types.select{|cls| cls.progid }.each do |cls|...
...#{cls.name}: PROGID=#{cls.progid}"
end

上記を実行すると以下の出力を得ます。

Guid of Excel typelib = {00020813-0000-0000-C000-000000000046}
version = 1.7
creatable classes:
Application: PROGID=Excel.Application.14
Chart: PROGID=Excel.Chart.8
Worksheet: PROGID=Excel...

RegexpError (31.0)

正規表現のコンパイルに失敗したときに発生します。

...正規表現のコンパイルに失敗したときに発生します。

例:

$ ruby -e 'Regexp.compile("*")'
-
e:1:in `initialize': target of repeat operator is not specified: /*/ (RegexpError)
from -e:1:in `Regexp#compile'
from -e:1...

Logger::Application (13.0)

ユーザ定義のアプリケーションにログ機能を簡単に追加することができます。

...クラスをインスタンス化して start メソッドを呼び出します。


例:

class
FooApp < Application
def initialize(foo_app, application_specific, arguments)
super('FooApp') # Name of the application.
end

def run
...
log(WARN, 'warning', 'my_method...
....error('my_method2') { 'Error!' }
...
end
end

status = FooApp.new(....).start

=== 注意

このクラスは 2.2.0 で gem ライブラリとして切り離されました。2.2.0
以降ではそちらを利用してください。

* https://rubygems.org/gems/logger-application...

Proc (13.0)

ブロックをコンテキスト(ローカル変数のスコープやスタックフ レーム)とともにオブジェクト化した手続きオブジェクトです。

...は Proc#call)
へジャンプし値を返すには next を使います。break や return ではありません。


//emlist[例][ruby]{
def foo
f
= Proc.new{
next 1
2 # この行に到達することはない
}
end

p foo().call #=> 1
//}

===[a:block] Proc オブ...
...4
nil
//}

//emlist[lambda は引数の数が違うとエラーになる][ruby]{
b = lambda{|a,b,c|
p a,b,c
}
b.call(2, 4)
#=> wrong number of arguments (2 for 3) (ArgumentError)
//}

d:spec/call#block_arg も参照してください。

==== ジャンプ構文の挙動の違い

return...
...、例外 LocalJumpError は発生しません。

//emlist[例][ruby]{
def foo
Proc.new { return }
end

foo.call
# => in `call': return from proc-closure (LocalJumpError)
//}

以下の表は、手続きオブジェクトの実行を上の例と同じように、手続きオブジェクトが定...
...4
nil
//}

//emlist[lambda は引数の数が違うとエラーになる][ruby]{
b = lambda{|a,b,c|
p a,b,c
}
b.call(2, 4)
# => wrong number of arguments (given 2, expected 3)
//}

d:spec/call#block_arg も参照してください。

==== ジャンプ構文の挙動の違い

return と br...