12件ヒット
[1-12件を表示]
(0.227秒)
ライブラリ
- ビルトイン (5)
-
cgi
/ core (2) - csv (2)
-
irb
/ context (2) -
webrick
/ httpresponse (1)
クラス
- CSV (2)
-
Encoding
:: Converter (1) -
Enumerator
:: Lazy (2) -
IRB
:: Context (2) -
RubyVM
:: AbstractSyntaxTree :: Node (2) -
WEBrick
:: HTTPResponse (1)
モジュール
キーワード
- []= (1)
-
col
_ sep (1) - each (1)
- first (1)
-
last
_ column (1) -
last
_ error (1) -
last
_ lineno (1) -
last
_ value (1) -
set
_ last _ value (1) - zip (2)
検索結果
先頭5件
-
CGI
:: QueryExtension :: Value # last -> self (81607.0) -
@todo
@todo -
RubyVM
:: AbstractSyntaxTree :: Node # last _ lineno -> Integer (64225.0) -
ソースコード中で、self を表すテキストが最後に現れる行番号を返します。
ソースコード中で、self を表すテキストが最後に現れる行番号を返します。
行番号は1-originです。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 1')
p node.last_lineno # => 1
//} -
IRB
:: Context # set _ last _ value(value) -> object (64207.0) -
ライブラリ内部で使用します。
ライブラリ内部で使用します。 -
IRB
:: Context # last _ value -> object (63907.0) -
irb 中での最後の実行結果を返します。
irb 中での最後の実行結果を返します。 -
Encoding
:: Converter # last _ error -> Exception | nil (54943.0) -
直前に変換器で発生した例外に相当する例外オブジェクトを返します。 直前の変換で例外が発生していない場合は nil を返します。
直前に変換器で発生した例外に相当する例外オブジェクトを返します。
直前の変換で例外が発生していない場合は nil を返します。
//emlist[][ruby]{
ec = Encoding::Converter.new("utf-8", "iso-8859-1")
p ec.primitive_convert(src="\xf1abcd", dst="") #=> :invalid_byte_sequence
p ec.last_error #=> #<Encoding::InvalidByteSequenceError: "\xF1" followed by "a"... -
RubyVM
:: AbstractSyntaxTree :: Node # last _ column -> Integer (45925.0) -
ソースコード中で、self を表すテキストが最後に現れる列番号を返します。
ソースコード中で、self を表すテキストが最後に現れる列番号を返します。
列番号は0-originで、バイト単位で表されます。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 1')
p node.last_column # => 5
//} -
CGI
:: QueryExtension :: Value # first -> self (36607.0) -
@todo
@todo -
Enumerator
:: Lazy # zip(*lists) {|v1 , v2 , . . . | . . . } -> nil (27928.0) -
Enumerable#zip と同じですが、配列ではなくEnumerator::Lazy を返します。
Enumerable#zip と同じですが、配列ではなくEnumerator::Lazy を返します。
ただし一貫性のため、ブロック付きで呼び出した場合は Enumerable#zip と
同じ挙動になります。
//emlist[例][ruby]{
1.step.lazy.zip(('a'..'z').cycle)
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:zip(#<Enumerator: "a".."z":cycle>)>
1.step.lazy.zip(('a'..'z').cycle)... -
CSV
# col _ sep -> String (27658.0) -
カラム区切り文字列として使用する文字列を返します。
カラム区切り文字列として使用する文字列を返します。
//emlist[例][ruby]{
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: "|")
csv.col_sep # => "|"
csv.first.to_a # => [["id", "1"], ["first name", "taro"... -
Enumerator
:: Lazy # zip(*lists) -> Enumerator :: Lazy (27628.0) -
Enumerable#zip と同じですが、配列ではなくEnumerator::Lazy を返します。
Enumerable#zip と同じですが、配列ではなくEnumerator::Lazy を返します。
ただし一貫性のため、ブロック付きで呼び出した場合は Enumerable#zip と
同じ挙動になります。
//emlist[例][ruby]{
1.step.lazy.zip(('a'..'z').cycle)
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:zip(#<Enumerator: "a".."z":cycle>)>
1.step.lazy.zip(('a'..'z').cycle)... -
WEBrick
:: HTTPResponse # []=(field , val) (9922.0) -
レスポンスの該当するヘッダに val を設定します。
レスポンスの該当するヘッダに val を設定します。
@param field ヘッダ名を文字列で指定します。大文字と小文字を区別しません。
@param val ヘッダの値を指定します。to_s メソッドによって文字列に変換されます。
require 'time'
res['last-modified'] = Time.now.httpdate
@see WEBrick::HTTPResponse#chunked?, WEBrick::HTTPResponse#content_length,
WEBrick::HTTPResponse#content_type
... -
CSV
# each {|row| . . . } -> nil (9730.0) -
各行に対してブロックを評価します。
各行に対してブロックを評価します。
データソースは読み込み用にオープンされていなければなりません。
//emlist[例 CSV.new 時に :header => true を指定した場合][ruby]{
require "csv"
users = <<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.new(users, headers: true)
csv.each do |row|
p row
end
...