種類
- インスタンスメソッド (242)
- 特異メソッド (176)
- 文書 (59)
- ライブラリ (44)
ライブラリ
- csv (286)
-
rexml
/ document (132)
クラス
- CSV (286)
-
REXML
:: Attributes (88) -
REXML
:: Element (33) -
REXML
:: XPath (11)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - << (11)
-
NEWS for Ruby 3
. 0 . 0 (4) - Ruby用語集 (11)
- [] (11)
- []= (11)
-
add
_ row (11) - attribute (11)
-
cgi
/ session (11) -
col
_ sep (11) - convert (33)
-
delete
_ all (11) - each (22)
-
each
_ attribute (11) - filter (33)
- generate (11)
-
get
_ attribute (11) -
get
_ attribute _ ns (11) -
header
_ convert (33) - instance (22)
- namespaces (11)
- open (44)
- parse (22)
- puts (11)
- rdoc (11)
- read (11)
- readlines (11)
- root (11)
-
root
_ node (11) - rss (11)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 9 feature (11) -
yaml
/ store (11)
検索結果
先頭5件
-
CSV
. new(data , options = Hash . new) -> CSV (18310.0) -
このメソッドは CSV ファイルを読み込んだり、書き出したりするために String か IO のインスタンスをラップします。
...す。
: :field_size_limit
This is a maximum size CSV will read ahead looking for the closing quote
for a field. (In truth, it reads to the first line ending beyond this
size.) If a quote cannot be found within the limit CSV will raise a
MalformedCSVError, assuming the data is faulty.......<-EOS
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS
File.write("test.csv", users)
File.open("test.csv", "r") do |f|
csv = CSV.new(f, headers: true)
csv.class # => CSV
csv.first # => #<CSV::Row "id":"1" "first name":"taro" "last name":"tanaka......{
require "csv"
users =<<-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.new(users, headers: true, col_sep: "|")
p csv.class # => CSV
p csv.first # => #<CSV::Row "id":"1" "first name":"taro" "last name":"tanaka" "age":"20">
//}
@see... -
REXML
:: XPath . first(element , path = nil , namespaces = {} , variables = {}) -> Node | nil (18243.0) -
element の path で指定した XPath 文字列にマッチする最初のノードを 返します。
...のルート要素からの
位置でマッチするノードを探します。
path を省略すると "*" を指定したことになります。
namespace で名前空間の対応付けを指定します。
variable で XPath 内の変数に対応する値を指定できます。
XPathインジ......m element 要素(REXML::Element)
@param path XPath文字列
@param namespace 名前空間とURLの対応付け
@param variables 変数名とその値の対応付け
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root xmlns:x='1'>
<a>
<b>b1</b>
<x:c />
<b>......<a> ... </>
b1 = REXML::XPath.first(a, "b")
b1.text # => "b1"
REXML::XPath.first(doc, "/root/a/x:c") # => <x:c/>
REXML::XPath.first(a, "x:c") # => <x:c/>
REXML::XPath.first(a, "y:c") # => nil
REXML::XPath.first(a, "y:c", {"y" => "1"}) # => <x:c/>
b2 = REXML::XPath.first(doc, "/root/a/b[text()=$v]",... -
REXML
:: Attributes # namespaces -> { String => String } (6112.0) -
self の中で宣言されている名前空間の集合を返します。
...ire 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='<'/>
</root>
EOS
a = doc.get_elements("/root/a").first
p doc.root.attributes.namespaces
# => {"foo"=>"http://example.org/foo......", "bar"=>"http://example.org/bar"}
p a.attributes.namespaces
# => {}
//}... -
NEWS for Ruby 3
. 0 . 0 (6090.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 3.0.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......and their values. 15822
* Windows: Read ENV names and values as UTF-8 encoded Strings 12650
* Encoding
* Added new encoding IBM720. 16233
* Changed default for Encoding.default_external to UTF-8 on Windows 16604
* Fiber
* Fiber.new(blocking: true/false) allows you to create non......ns. At the moment, compaction adds significant overhead to major collections, so please test first! 17176
* Hash
* Hash#transform_keys and Hash#transform_keys! now accept a hash that maps keys to new keys. 16274
* Hash#except has been added, which returns a hash excluding the given keys... -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (4392.0) -
1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))
...スのスーパークラスは同じなのだそうです
((<ruby-bugs-ja:324>))。さあっぱりわかりません(^^;;
class << Object.new
class << self.superclass
p [self.id, self]
end
class << self
p [self.superclass.id, self.supe......なりました。
((<ruby-core:00927>))
: ((<NameError>)) & ((<NoMethodError>)) [change]
NameError を StandardError のサブクラスに戻しました。
クラス階層は以下のようになりました。
NoMethodError < NameError < StandardError.
: ((<Interrupt>))......22>))
: ((<組み込み関数/abort>)) [compat]
終了メッセージを指定できるようになりました。
=== Array
: ((<Array#first|Array/first>)) [compat]
: ((<Array#last|Array/last>)) [compat]
省略可能な引数を追加
: ((<Array#push|Array/push>)) [compat]
: ((<Array#unsh... -
ruby 1
. 9 feature (3486.0) -
ruby 1.9 feature ruby version 1.9.0 は開発版です。 以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。 1.9.1 以降は安定版です。 バグ修正がメインになります。
...* [regexp]: 正規表現の機能拡張
* [marshal]: Marshal ファイルのフォーマット変更
* レベル
* [bug]: バグ修正
* [new]: 追加されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど(互換性のある変更) (only backward-......Module#attr
オプショナル引数の assignable がなくなり、attr_reader 相当になりました
[RCR#331]
=== 2006-06-22
: Module#name
無名モジュールに対しては nil を返すようになりました
[ruby-talk:198440]
=== 2006-06-17
: BasicObject#invoke_method
: B......#group_by [new]
: Enumerable#first [new]
追加
=== 2006-01-26
: ((<BasicSocket/BasicSocket.do_not_reverse_lookup>)) [compat]
do_not_reverse_lookup のデフォルトが true になりました。
=== 2006-01-10
: ((<GC/GC.stress>)) [new]
: ((<GC/GC.stress=>)) [new]
GC.stres... -
ruby 1
. 8 . 2 feature (3420.0) -
ruby 1.8.2 feature ruby 1.8.2 での ruby 1.8.1 からの変更点です。
...* [ruby]: ruby インタプリタの変更
* [api]: 拡張ライブラリ API
* [lib]: ライブラリ
*レベル
* [bug]: バグ修正
* [new]: 追加されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど
* 互換性のある変更
* on......: OpenSSL::X509::Store#time= [lib] [new]
: OpenSSL::X509::StoreContext#time= [lib] [new]
追加。
: OpenSSL::X509::Name::RFC2253DN [lib] [new]
module for RFC2253 DN format.
: OpenSSL::X509::Name.parse_rfc2253 [lib] [new]
new method to parse RFC2253 DN format.
=== 2004......ruby-dev:22815>)) ((<ruby-dev:22819>))
=== 2004-02-06
: PrettyPrint#first? [lib] [obsolete]
=== 2004-02-05
: PrettyPrint#seplist [lib] [new]
=== 2004-01-29
: OpenSSL::X509::Name#add_entry [lib] [new]
=== 2004-01-26
: Regexp.new [ruby] [obsolete]
「{,m}」表記の場合と「{n,m}」の n,m... -
ruby 1
. 6 feature (3354.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...:EWOULDBLOCK
=> ruby 1.6.8 (2002-12-24) [i586-linux]
Errno::EAGAIN
-:2: uninitialized constant EWOULDBLOCK at Errno (NameError)
=> ruby 1.6.8 (2003-02-13) [i586-linux]
Errno::EAGAIN
Errno::EAGAIN
== 1.6.7 (2002-03-01) -> 1.6.8 (2002-12-2......00019>))
: 2002-09-11: Queue#((<Queue/pop>))
Queue#pop に競合状態の問題がありました ((<ruby-dev:17223>))
: 2002-09-11: SizedQueue.new
引数に 0 以下を受けつけるバグが修正されました。
: 2002-09-05: ((<リテラル/式展開>))
stable snapshot で、一......p /a#{Regexp.quote("#")}b/x =~ "ab"
=> -:3: warning: ambiguous first argument; make sure
ruby 1.6.7 (2002-03-01) [i586-linux]
"#"
0
=> -:3: warning: ambiguous first argument; make sure
ruby 1.6.7 (2002-07-30) [i586-linux]... -
CSV
. open(filename , mode = "rb" , options = Hash . new) -> CSV (336.0) -
このメソッドは IO オブジェクトをオープンして CSV でラップします。 これは CSV ファイルを書くための主要なインターフェイスとして使うことを意図しています。
...IO#tell
* IO#to_i
* IO#to_io
* File#truncate
* IO#tty?
@param filename ファイル名を指定します。
@param mode IO.open に指定できるものと同じものを指定できます。
@param options CSV.new のオプションと同じオプションを指定できます。
//emli......"csv"
File.write("test.csv", <<CSV)
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
CSV
csv = CSV.open("test.csv", headers: true)
csv.class # => CSV
csv.first # => #<CSV::Row "id":"1" "first name":"taro" "last name":"tanaka" "age":"20">
//}
//emlist[例......v"
users =<<-EOS
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS
File.write("test.csv", users)
CSV.open("test.csv", headers: true) do |csv|
csv.class # => CSV
csv.first # => #<CSV::Row "id":"1" "first name":"taro" "last name":"tanaka" "age":"20"... -
CSV
. open(filename , mode = "rb" , options = Hash . new) {|csv| . . . } -> nil (336.0) -
このメソッドは IO オブジェクトをオープンして CSV でラップします。 これは CSV ファイルを書くための主要なインターフェイスとして使うことを意図しています。
...IO#tell
* IO#to_i
* IO#to_io
* File#truncate
* IO#tty?
@param filename ファイル名を指定します。
@param mode IO.open に指定できるものと同じものを指定できます。
@param options CSV.new のオプションと同じオプションを指定できます。
//emli......"csv"
File.write("test.csv", <<CSV)
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
CSV
csv = CSV.open("test.csv", headers: true)
csv.class # => CSV
csv.first # => #<CSV::Row "id":"1" "first name":"taro" "last name":"tanaka" "age":"20">
//}
//emlist[例......v"
users =<<-EOS
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS
File.write("test.csv", users)
CSV.open("test.csv", headers: true) do |csv|
csv.class # => CSV
csv.first # => #<CSV::Row "id":"1" "first name":"taro" "last name":"tanaka" "age":"20"...