別のキーワード
種類
- インスタンスメソッド (863)
- 文書 (103)
- 特異メソッド (36)
- 関数 (12)
ライブラリ
- ビルトイン (533)
- csv (72)
-
io
/ console (12) -
io
/ wait (12) -
net
/ http (12) - open-uri (36)
- pathname (84)
- readline (36)
- thread (6)
-
webrick
/ server (12) -
win32
/ registry (12) - zlib (72)
クラス
-
ARGF
. class (12) - CSV (60)
-
CSV
:: Table (12) - Dir (36)
- IO (84)
- Method (14)
-
Net
:: HTTPResponse (12) - Object (30)
- Pathname (84)
- Proc (14)
- String (12)
- Thread (157)
-
Thread
:: Backtrace :: Location (72) -
Thread
:: ConditionVariable (36) -
Thread
:: Mutex (40) -
Thread
:: Queue (10) -
Thread
:: SizedQueue (10) - ThreadGroup (36)
-
WEBrick
:: GenericServer (12) -
Win32
:: Registry (12) -
Zlib
:: GzipReader (48) -
Zlib
:: GzipWriter (24)
モジュール
-
OpenURI
:: OpenRead (36)
オブジェクト
-
Readline
:: HISTORY (36)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - << (50)
- >> (14)
-
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 6 . 0 (7) -
NEWS for Ruby 3
. 1 . 0 (4) -
absolute
_ path (12) - add (12)
-
add
_ row (12) -
backtrace
_ locations (24) -
base
_ label (12) - binmode (12)
- binread (12)
- broadcast (12)
- clear (12)
- clone (12)
- close (32)
- closed? (12)
- count (12)
- dup (12)
- each (24)
-
each
_ line (24) - enclose (12)
- exit (12)
- flush (24)
- join (24)
- kill (12)
- label (12)
- lineno (12)
- list (12)
- lock (10)
- name (10)
- name= (10)
- open (36)
- owned? (10)
- path (12)
-
pending
_ interrupt? (12) - pos= (12)
- push (24)
- puts (12)
- raw (12)
-
rb
_ thread _ s _ abort _ exc _ set (12) - readable? (12)
-
readable
_ real? (12) -
reader
_ header (12) - readlines (24)
- readlink (12)
- rewind (12)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 2 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) - run (12)
-
safe
_ level (5) - seek (12)
- signal (12)
- synchronize (10)
- terminate (12)
- then (14)
-
to
_ s (12) - tokens (12)
- unlock (10)
- value (12)
- wait (12)
-
wait
_ readable (12) - wakeup (12)
-
world
_ readable? (12) -
yield
_ self (16)
検索結果
先頭5件
-
OpenURI
:: OpenRead # read(options = {}) -> String (21139.0) -
自身が表す内容を読み込んで文字列として返します。 self.open(options={}) {|io| io.read } と同じです。 このメソッドによって返される文字列は OpenURI::Meta によって extend されています。
...
self.open(options={}) {|io| io.read } と同じです。
このメソッドによって返される文字列は OpenURI::Meta
によって extend されています。
@param options ハッシュを与えます。
require 'open-uri'
uri = URI.parse('http://www.example.com/')
str = uri.read... -
CSV
# read -> [Array] | CSV :: Table (18141.0) -
残りの行を読み込んで配列の配列を返します。 self の生成時に headers オプションに偽でない値が指定されていた場合は CSV::Table オブジェクトを返します。
...残りの行を読み込んで配列の配列を返します。
self の生成時に headers オプションに偽でない値が指定されていた場合は CSV::Table オブジェクトを返します。
データソースは読み込み用にオープンされている必要があります。......e "csv"
csv = CSV.new(DATA.read)
csv.read
# => [["header1", "header2"], ["row1_1", "row1_2"], ["row2_1", "row2_2"]]
__END__
header1,header2
row1_1,row1_2
row2_1,row2_2
//}
//emlist[例 headers: true][ruby]{
require "csv"
csv = CSV.new(DATA.read, headers: true)
csv.read
# => #<CSV::Table mode:col... -
Pathname
# read(*args) -> String | nil (18139.0) -
IO.read(self.to_s, *args)と同じです。
...IO.read(self.to_s, *args)と同じです。
@see IO.read... -
static VALUE rb
_ thread _ s _ abort _ exc _ set(VALUE self , VALUE val) (6200.0) -
-
Object
# yield _ self -> Enumerator (6160.0) -
self を引数としてブロックを評価し、ブロックの結果を返します。
...
self を引数としてブロックを評価し、ブロックの結果を返します。
//emlist[例][ruby]{
"my string".yield_self {|s| s.upcase } # => "MY STRING"
3.next.yield_self {|x| x**x }.to_s # => "256"
//}
値をメソッドチェインのパイプラインに次々と渡すの......ld_self {|url| URI(url).read }.
yield_self {|response| JSON.parse(response) }
//}
ブロックなしで呼び出されたときは Enumerator を返します。
例えば条件によって値を捨てるのに使えます。
//emlist[][ruby]{
# 条件にあうので何もしない
1.yield_self.d......etect(&:odd?) # => 1
# 条件に合わないので値を捨てる
2.yield_self.detect(&:odd?) # => nil
//}
@see Object#tap... -
Object
# yield _ self {|x| . . . } -> object (6160.0) -
self を引数としてブロックを評価し、ブロックの結果を返します。
...
self を引数としてブロックを評価し、ブロックの結果を返します。
//emlist[例][ruby]{
"my string".yield_self {|s| s.upcase } # => "MY STRING"
3.next.yield_self {|x| x**x }.to_s # => "256"
//}
値をメソッドチェインのパイプラインに次々と渡すの......ld_self {|url| URI(url).read }.
yield_self {|response| JSON.parse(response) }
//}
ブロックなしで呼び出されたときは Enumerator を返します。
例えば条件によって値を捨てるのに使えます。
//emlist[][ruby]{
# 条件にあうので何もしない
1.yield_self.d......etect(&:odd?) # => 1
# 条件に合わないので値を捨てる
2.yield_self.detect(&:odd?) # => nil
//}
@see Object#tap... -
CSV
# readlines -> [Array] | CSV :: Table (6141.0) -
残りの行を読み込んで配列の配列を返します。 self の生成時に headers オプションに偽でない値が指定されていた場合は CSV::Table オブジェクトを返します。
...残りの行を読み込んで配列の配列を返します。
self の生成時に headers オプションに偽でない値が指定されていた場合は CSV::Table オブジェクトを返します。
データソースは読み込み用にオープンされている必要があります。......e "csv"
csv = CSV.new(DATA.read)
csv.read
# => [["header1", "header2"], ["row1_1", "row1_2"], ["row2_1", "row2_2"]]
__END__
header1,header2
row1_1,row1_2
row2_1,row2_2
//}
//emlist[例 headers: true][ruby]{
require "csv"
csv = CSV.new(DATA.read, headers: true)
csv.read
# => #<CSV::Table mode:col... -
Pathname
# binread(*args) -> String | nil (6116.0) -
IO.binread(self.to_s, *args)と同じです。
....binread(self.to_s, *args)と同じです。
//emlist[例][ruby]{
require "pathname"
pathname = Pathname("testfile")
pathname.binread # => "This is line one\nThis is line two\nThis is line three\nAnd so on...\n"
pathname.binread(20) # => "This is line one\nThi"
pathname.binread(20,......10) # => "ne one\nThis is line "
//}
@see IO.binread... -
Pathname
# readable? -> bool (6116.0) -
FileTest.readable?(self.to_s) と同じです。
...FileTest.readable?(self.to_s) と同じです。
@see FileTest.#readable?... -
Pathname
# readable _ real? -> bool (6116.0) -
FileTest.readable_real?(self.to_s) と同じです。
...FileTest.readable_real?(self.to_s) と同じです。
@see FileTest.#readable_real?... -
Pathname
# readlines(*args) -> [String] (6116.0) -
IO.readlines(self.to_s, *args)と同じです。
...IO.readlines(self.to_s, *args)と同じです。
@see IO.readlines...