ライブラリ
- csv (13)
- mkmf (4)
-
net
/ http (8) -
rubygems
/ package / tar _ header (4) -
webrick
/ httprequest (1)
クラス
- CSV (7)
-
CSV
:: Row (2) -
CSV
:: Table (4) -
Gem
:: Package :: TarHeader (4) -
Net
:: HTTP (1) -
WEBrick
:: HTTPRequest (1)
モジュール
- Kernel (4)
-
Net
:: HTTPHeader (7)
キーワード
- [] (1)
-
canonical
_ each (1) -
check
_ signedness (2) - convert (3)
-
convertible
_ int (2) -
delete
_ if (2) - each (4)
-
each
_ capitalized (1) -
each
_ capitalized _ name (1) -
each
_ header (1) -
each
_ key (1) -
each
_ name (1) - gname (1)
- header? (1)
-
header
_ convert (3) - include? (1)
- linkname (1)
-
send
_ request (1) - uname (1)
検索結果
先頭5件
-
Gem
:: Package :: TarHeader # name -> String (63355.0) -
tar のヘッダに含まれる name を返します。
tar のヘッダに含まれる name を返します。 -
Net
:: HTTPHeader # each _ capitalized _ name {|name| . . . . } -> () (27724.0) -
保持しているヘッダ名を正規化 ('x-my-header' -> 'X-My-Header') して、ブロックに渡します。
保持しているヘッダ名を正規化
('x-my-header' -> 'X-My-Header')
して、ブロックに渡します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.each_capitalized_name { |key| puts key }
# => Accept-Encoding
# => Accept
# => User-Agent
//} -
Gem
:: Package :: TarHeader # gname -> String (27304.0) -
tar のヘッダに含まれるグループ名を返します。
tar のヘッダに含まれるグループ名を返します。 -
Gem
:: Package :: TarHeader # linkname -> String (27304.0) -
tar のヘッダに含まれる linkname を返します。
tar のヘッダに含まれる linkname を返します。 -
Gem
:: Package :: TarHeader # uname -> String (27304.0) -
tar のヘッダに含まれるユーザ名を返します。
tar のヘッダに含まれるユーザ名を返します。 -
CSV
# header _ convert(name) (18850.0) -
CSV#convert に似ていますが、ヘッダ行用のメソッドです。
CSV#convert に似ていますが、ヘッダ行用のメソッドです。
このメソッドはヘッダ行を読み込む前に呼び出さなければなりません。
@param name 変換器の名前を指定します。
//emlist[例 name を指定][ruby]{
require "csv"
csv = CSV.new("header1,header2\nrow1_1,row1_2", headers: true)
csv.header_convert(:symbol)
csv.first.headers # => [:header1, :header2]
//}
//emlist[例 ブロックを指定][... -
CSV
:: Row # header?(name) -> bool (18739.0) -
自身のヘッダに与えられた値が含まれている場合は真を返します。 そうでない場合は偽を返します。
自身のヘッダに与えられた値が含まれている場合は真を返します。
そうでない場合は偽を返します。
@param name この行のヘッダに含まれているかどうか調べたい値を指定します。
//emlist[例][ruby]{
require "csv"
row = CSV::Row.new(["header1", "header2"], [1, 2])
row.header?("header1") # => true
row.header?("header3") # => false
//} -
Net
:: HTTPHeader # each _ name {|name| . . . } -> () (18667.0) -
保持しているヘッダ名をブロックに渡して呼びだします。
保持しているヘッダ名をブロックに渡して呼びだします。
ヘッダ名は小文字で統一されます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.each_name { |name| puts name }
# => accept-encoding
# => accept
# => user-agent
//} -
Net
:: HTTPHeader # each _ header {|name , val| . . . . } -> () (18631.0) -
保持しているヘッダ名とその値をそれぞれ ブロックに渡して呼びだします。
保持しているヘッダ名とその値をそれぞれ
ブロックに渡して呼びだします。
ヘッダ名は小文字で統一されます。
val は ", " で連結した文字列がブロックに渡されます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.each_header { |key,value| puts "#{key} = #{value}" }
# => accept-encoding... -
CSV
# header _ convert {|field , field _ info| . . . } (18550.0) -
CSV#convert に似ていますが、ヘッダ行用のメソッドです。
CSV#convert に似ていますが、ヘッダ行用のメソッドです。
このメソッドはヘッダ行を読み込む前に呼び出さなければなりません。
@param name 変換器の名前を指定します。
//emlist[例 name を指定][ruby]{
require "csv"
csv = CSV.new("header1,header2\nrow1_1,row1_2", headers: true)
csv.header_convert(:symbol)
csv.first.headers # => [:header1, :header2]
//}
//emlist[例 ブロックを指定][... -
CSV
# header _ convert {|field| . . . } (18550.0) -
CSV#convert に似ていますが、ヘッダ行用のメソッドです。
CSV#convert に似ていますが、ヘッダ行用のメソッドです。
このメソッドはヘッダ行を読み込む前に呼び出さなければなりません。
@param name 変換器の名前を指定します。
//emlist[例 name を指定][ruby]{
require "csv"
csv = CSV.new("header1,header2\nrow1_1,row1_2", headers: true)
csv.header_convert(:symbol)
csv.first.headers # => [:header1, :header2]
//}
//emlist[例 ブロックを指定][... -
CSV
:: Row # include?(name) -> bool (9439.0) -
自身のヘッダに与えられた値が含まれている場合は真を返します。 そうでない場合は偽を返します。
自身のヘッダに与えられた値が含まれている場合は真を返します。
そうでない場合は偽を返します。
@param name この行のヘッダに含まれているかどうか調べたい値を指定します。
//emlist[例][ruby]{
require "csv"
row = CSV::Row.new(["header1", "header2"], [1, 2])
row.header?("header1") # => true
row.header?("header3") # => false
//} -
Net
:: HTTPHeader # each _ key {|name| . . . } -> () (9367.0) -
保持しているヘッダ名をブロックに渡して呼びだします。
保持しているヘッダ名をブロックに渡して呼びだします。
ヘッダ名は小文字で統一されます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.each_name { |name| puts name }
# => accept-encoding
# => accept
# => user-agent
//} -
Net
:: HTTPHeader # canonical _ each {|name , value| . . . . } -> () (9346.0) -
ヘッダフィールドの正規化名とその値のペアを ブロックに渡し、呼びだします。
ヘッダフィールドの正規化名とその値のペアを
ブロックに渡し、呼びだします。
正規化名は name に対し
name.downcase.split(/-/).capitalize.join('-')
で求まる文字列です。 -
Net
:: HTTPHeader # each _ capitalized {|name , value| . . . . } -> () (9346.0) -
ヘッダフィールドの正規化名とその値のペアを ブロックに渡し、呼びだします。
ヘッダフィールドの正規化名とその値のペアを
ブロックに渡し、呼びだします。
正規化名は name に対し
name.downcase.split(/-/).capitalize.join('-')
で求まる文字列です。 -
Net
:: HTTPHeader # each {|name , val| . . . . } -> () (9331.0) -
保持しているヘッダ名とその値をそれぞれ ブロックに渡して呼びだします。
保持しているヘッダ名とその値をそれぞれ
ブロックに渡して呼びだします。
ヘッダ名は小文字で統一されます。
val は ", " で連結した文字列がブロックに渡されます。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.each_header { |key,value| puts "#{key} = #{value}" }
# => accept-encoding... -
CSV
:: Table # each {|column _ name , values| . . . } -> self (703.0) -
デフォルトのミックスモードかロウモードでは、行単位で繰り返します。カラ ムモードでは、ブロックに列名と対応する値の配列を与え、列単位で繰り返し ます。
デフォルトのミックスモードかロウモードでは、行単位で繰り返します。カラ
ムモードでは、ブロックに列名と対応する値の配列を与え、列単位で繰り返し
ます。
//emlist[例 ロウモード][ruby]{
require "csv"
row1 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])
row2 = CSV::Row.new(["header1", "header2"], ["row2_1", "row2_2"])
row3 = CSV::Row.new(["header1", "header2"], ["row3... -
Net
:: HTTP # send _ request(name , path , data = nil , header = nil) -> Net :: HTTPResponse (646.0) -
HTTP リクエストをサーバに送り、そのレスポンスを Net::HTTPResponse のインスタンスとして返します。
HTTP リクエストをサーバに送り、そのレスポンスを
Net::HTTPResponse のインスタンスとして返します。
@param name リクエストのメソッド名を文字列で与えます。
@param path リクエストのパスを文字列で与えます。
@param data リクエストのボディを文字列で与えます。
@param header リクエストのヘッダをハッシュで与えます。
//emlist[例][ruby]{
response = http.send_request('GET', '/index.html')
puts response.body
//}
@see Net::H... -
WEBrick
:: HTTPRequest # [](header _ name) -> String (646.0) -
リクエストのヘッダの該当する内容を文字列で返します。
リクエストのヘッダの該当する内容を文字列で返します。
@param header_name ヘッダー名を文字列で指定します。大文字と小文字を区別しません。 -
CSV
:: Table # delete _ if {|column _ name , values| . . . } -> self (577.0) -
ブロックを評価した結果が真である行か列を削除します。
ブロックを評価した結果が真である行か列を削除します。
デフォルトのミックスモードかロウモードでは、行単位で繰り返します。カラ
ムモードでは、ブロックに列名と対応する値の配列を与え、列単位で繰り返し
ます。
//emlist[例 ロウモード][ruby]{
require "csv"
row1 = CSV::Row.new(["header1", "header2"], ["row1_1", "valid"])
row2 = CSV::Row.new(["header1", "header2"], ["row2_1", "invalid"])
row3 = CSV::Row.new(["... -
Kernel
# convertible _ int(type , headers = nil , opts = nil) (544.0) -
Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG
Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.
If the +type+ is a integer type and _convertible_ type is found,
following macros are p... -
Kernel
# convertible _ int(type , headers = nil , opts = nil) { . . . } (544.0) -
Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG
Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.
If the +type+ is a integer type and _convertible_ type is found,
following macros are p... -
CSV
# convert(name) (463.0) -
引数 name で指定した変換器かブロックに各フィールドを渡して文字列から別 のオブジェクトへと変換します。
引数 name で指定した変換器かブロックに各フィールドを渡して文字列から別
のオブジェクトへと変換します。
引数 name を指定した場合は、組み込みの CSV::Converters を変換器
として利用するために使います。また、独自の変換器を追加することもできま
す。
ブロックパラメータを一つ受け取るブロックを与えた場合は、そのブロックは
フィールドを受け取ります。ブロックパラメータを二つ受け取るブロックを与
えた場合は、そのブロックは、フィールドと CSV::FieldInfo のインス
タンスを受け取ります。ブロックは変換後の値かフィールドそのものを返さな
ければなりません。
... -
CSV
:: Table # each {|row| . . . } -> self (403.0) -
デフォルトのミックスモードかロウモードでは、行単位で繰り返します。カラ ムモードでは、ブロックに列名と対応する値の配列を与え、列単位で繰り返し ます。
デフォルトのミックスモードかロウモードでは、行単位で繰り返します。カラ
ムモードでは、ブロックに列名と対応する値の配列を与え、列単位で繰り返し
ます。
//emlist[例 ロウモード][ruby]{
require "csv"
row1 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])
row2 = CSV::Row.new(["header1", "header2"], ["row2_1", "row2_2"])
row3 = CSV::Row.new(["header1", "header2"], ["row3... -
Kernel
# check _ signedness(type , headers = nil , opts = nil) -> "signed" | "unsigned" | nil (400.0) -
Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.
Returns the signedness of the given +type+. You may optionally
specify additional +headers+ to search in for the +type+.
If the +type+ is found and is a numeric type, a macro is passed as a
preprocessor constant to the compiler using the +type+ name, in
uppercase, prepended with 'SIGNEDNESS... -
Kernel
# check _ signedness(type , headers = nil , opts = nil) { . . . } -> "signed" | "unsigned" | nil (400.0) -
Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.
Returns the signedness of the given +type+. You may optionally
specify additional +headers+ to search in for the +type+.
If the +type+ is found and is a numeric type, a macro is passed as a
preprocessor constant to the compiler using the +type+ name, in
uppercase, prepended with 'SIGNEDNESS... -
CSV
# each {|row| . . . } -> nil (292.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
... -
CSV
:: Table # delete _ if {|row| . . . } -> self (277.0) -
ブロックを評価した結果が真である行か列を削除します。
ブロックを評価した結果が真である行か列を削除します。
デフォルトのミックスモードかロウモードでは、行単位で繰り返します。カラ
ムモードでは、ブロックに列名と対応する値の配列を与え、列単位で繰り返し
ます。
//emlist[例 ロウモード][ruby]{
require "csv"
row1 = CSV::Row.new(["header1", "header2"], ["row1_1", "valid"])
row2 = CSV::Row.new(["header1", "header2"], ["row2_1", "invalid"])
row3 = CSV::Row.new(["... -
CSV
# convert {|field , field _ info| . . . } (163.0) -
引数 name で指定した変換器かブロックに各フィールドを渡して文字列から別 のオブジェクトへと変換します。
引数 name で指定した変換器かブロックに各フィールドを渡して文字列から別
のオブジェクトへと変換します。
引数 name を指定した場合は、組み込みの CSV::Converters を変換器
として利用するために使います。また、独自の変換器を追加することもできま
す。
ブロックパラメータを一つ受け取るブロックを与えた場合は、そのブロックは
フィールドを受け取ります。ブロックパラメータを二つ受け取るブロックを与
えた場合は、そのブロックは、フィールドと CSV::FieldInfo のインス
タンスを受け取ります。ブロックは変換後の値かフィールドそのものを返さな
ければなりません。
... -
CSV
# convert {|field| . . . } (163.0) -
引数 name で指定した変換器かブロックに各フィールドを渡して文字列から別 のオブジェクトへと変換します。
引数 name で指定した変換器かブロックに各フィールドを渡して文字列から別
のオブジェクトへと変換します。
引数 name を指定した場合は、組み込みの CSV::Converters を変換器
として利用するために使います。また、独自の変換器を追加することもできま
す。
ブロックパラメータを一つ受け取るブロックを与えた場合は、そのブロックは
フィールドを受け取ります。ブロックパラメータを二つ受け取るブロックを与
えた場合は、そのブロックは、フィールドと CSV::FieldInfo のインス
タンスを受け取ります。ブロックは変換後の値かフィールドそのものを返さな
ければなりません。
...