別のキーワード
種類
- インスタンスメソッド (787)
- 文書 (93)
- 特異メソッド (33)
- 関数 (11)
ライブラリ
- ビルトイン (484)
- csv (66)
-
io
/ console (11) -
io
/ wait (11) -
net
/ http (11) - open-uri (33)
- pathname (77)
- readline (33)
- thread (6)
-
webrick
/ server (11) -
win32
/ registry (11) - zlib (66)
クラス
-
ARGF
. class (11) - CSV (55)
-
CSV
:: Table (11) - Dir (33)
- IO (77)
- Method (12)
-
Net
:: HTTPResponse (11) - Object (26)
- Pathname (77)
- Proc (12)
- String (11)
- Thread (144)
-
Thread
:: Backtrace :: Location (66) -
Thread
:: ConditionVariable (33) -
Thread
:: Mutex (36) -
Thread
:: Queue (9) -
Thread
:: SizedQueue (9) - ThreadGroup (33)
-
WEBrick
:: GenericServer (11) -
Win32
:: Registry (11) -
Zlib
:: GzipReader (44) -
Zlib
:: GzipWriter (22)
モジュール
-
OpenURI
:: OpenRead (33)
オブジェクト
-
Readline
:: HISTORY (33)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - << (45)
- >> (12)
-
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 2
. 6 . 0 (6) -
NEWS for Ruby 3
. 1 . 0 (3) -
absolute
_ path (11) - add (11)
-
add
_ row (11) -
backtrace
_ locations (22) -
base
_ label (11) - binmode (11)
- binread (11)
- broadcast (11)
- clear (11)
- clone (11)
- close (29)
- closed? (11)
- count (11)
- dup (11)
- each (22)
-
each
_ line (22) - enclose (11)
- exit (11)
- flush (22)
- join (22)
- kill (11)
- label (11)
- lineno (11)
- list (11)
- lock (9)
- name (9)
- name= (9)
- open (33)
- owned? (9)
- path (11)
-
pending
_ interrupt? (11) - pos= (11)
- push (22)
- puts (11)
- raw (11)
-
rb
_ thread _ s _ abort _ exc _ set (11) - readable? (11)
-
readable
_ real? (11) -
reader
_ header (11) - readlines (22)
- readlink (11)
- rewind (11)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 8 . 3 feature (11) -
ruby 1
. 8 . 4 feature (11) -
ruby 1
. 9 feature (11) - run (11)
-
safe
_ level (5) - seek (11)
- signal (11)
- synchronize (9)
- terminate (11)
- then (12)
-
to
_ s (11) - tokens (11)
- unlock (9)
- value (11)
- wait (11)
-
wait
_ readable (11) - wakeup (11)
-
world
_ readable? (11) -
yield
_ self (14)
検索結果
先頭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...