別のキーワード
ライブラリ
- ビルトイン (342)
- csv (36)
- etc (12)
- getoptlong (12)
- mkmf (12)
-
net
/ http (732) - optparse (36)
- pathname (24)
- psych (24)
-
rake
/ packagetask (192) - resolv (24)
-
rexml
/ document (252) - socket (120)
- stringio (48)
- strscan (36)
クラス
-
ARGF
. class (60) - Addrinfo (24)
- Binding (48)
- CSV (36)
- Data (6)
- Dir (24)
- Exception (24)
- IPSocket (12)
- Module (24)
-
Net
:: HTTP (192) -
Net
:: HTTPGenericRequest (36) -
Net
:: HTTPResponse (108) - Object (48)
- OptionParser (24)
- Pathname (24)
-
REXML
:: Attribute (36) -
REXML
:: Attributes (144) -
REXML
:: Element (60) -
REXML
:: Instruction (12) -
Rake
:: PackageTask (192) - Resolv (24)
- Socket (72)
- String (12)
- StringIO (48)
- StringScanner (36)
- TCPSocket (12)
- Thread (24)
- Time (48)
モジュール
- Etc (12)
- Kernel (24)
-
Net
:: HTTPExceptions (12) -
Net
:: HTTPHeader (372) -
OptionParser
:: Arguable (12) - Psych (24)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - == (12)
-
Data
_ Get _ Struct (12) - GetoptLong (12)
- HTTPRequest (12)
- Lazy (12)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 2 . 0 (11) -
NEWS for Ruby 3
. 0 . 0 (5) - Proxy (12)
- [] (36)
- []= (24)
-
add
_ field (12) - attribute (12)
-
backtrace
_ locations (12) -
basic
_ auth (12) - body (12)
- cgi (12)
-
cgi
/ session (12) - chunked? (12)
-
class
_ variable _ get (12) - code (12)
- connect (12)
-
connect
_ from (24) -
const
_ get (12) -
content
_ length (12) -
content
_ length= (12) -
content
_ range (12) -
content
_ type= (12) -
create
_ makefile (12) - define (6)
- delete (24)
-
delete
_ all (12) - drb (12)
- dump (24)
- each (24)
-
each
_ attribute (12) -
each
_ capitalized _ name (12) -
each
_ header (12) -
each
_ key (12) -
each
_ name (12) -
each
_ value (12) - entity (12)
- eval (12)
- fetch (36)
-
form
_ data= (12) - get2 (24)
-
get
_ attribute (12) -
get
_ attribute _ ns (12) -
get
_ byte (12) -
get
_ fields (12) -
get
_ print (24) -
get
_ text (12) - getaddress (24)
- getaddrinfo (12)
- getbyte (48)
- getc (24)
- getch (12)
- getgm (12)
- gethostbyname (24)
- gethostname (12)
- getlocal (24)
- getlogin (12)
- getname (12)
- getoptlong (12)
- getopts (36)
- gets (72)
- getutc (12)
- getwd (24)
- head2 (24)
-
http
_ version (12) -
instance
_ variable _ defined? (12) -
instance
_ variable _ get (12) -
instance
_ variable _ set (12) -
instance
_ variables (12) - key? (12)
- length (12)
-
lex
_ getline (12) -
local
_ host= (12) -
local
_ port= (12) -
local
_ variable _ defined? (12) -
local
_ variable _ get (12) -
local
_ variable _ set (12) -
main
_ type (12) - method (24)
- msg (12)
- name (12)
- name= (12)
- namespace (12)
- namespaces (12)
-
need
_ tar (12) -
need
_ tar= (12) -
need
_ tar _ bz2 (12) -
need
_ tar _ bz2= (12) -
need
_ tar _ gz (12) -
need
_ tar _ gz= (12) -
need
_ zip (12) -
need
_ zip= (12) -
net
/ ftp (12) -
net
/ http (12) - new (12)
-
package
_ dir (12) -
package
_ dir= (12) -
package
_ dir _ path (12) -
package
_ files (12) -
package
_ files= (12) - path (12)
- prefix (12)
- prefixes (12)
-
proxy
_ basic _ auth (12) - pwd (24)
-
rake
/ gempackagetask (12) - range (12)
-
range
_ length (12) -
rb
_ gv _ get (12) - rdoc (12)
-
read
_ body (24) - readline (12)
-
request
_ get (24) -
request
_ head (24) - response (12)
-
response
_ body _ permitted? (12) - root (12)
-
root
_ node (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) -
send
_ request (12) -
set
_ content _ type (12) -
set
_ form _ data (12) - shift (12)
- size (12)
-
sub
_ type (12) - target (12)
- tcp (24)
- text (12)
-
thread
_ variable _ set (12) -
to
_ string (12) -
type
_ params (12) - ungetc (12)
- value (12)
-
webrick
/ cgi (12) - 制御構造 (12)
検索結果
先頭5件
-
Net
:: HTTP # get(path , header = nil , dest = nil) -> Net :: HTTPResponse (18138.0) -
サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。
...ist[例][ruby]{
# net/http version 1.1
response, body = http.get( '/index.html' )
# net/http version 1.2
response = http.get('/index.html')
# compatible in both version
response , = http.get('/index.html')
response.body
# compatible, using block
File.open('save.txt', 'w') {|f|
http.get('/~foo/'......, nil) do |str|
f.write str
end
}
//}
@see Net::HTTP#request_get... -
Net
:: HTTP # get(path , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse (18138.0) -
サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。
...ist[例][ruby]{
# net/http version 1.1
response, body = http.get( '/index.html' )
# net/http version 1.2
response = http.get('/index.html')
# compatible in both version
response , = http.get('/index.html')
response.body
# compatible, using block
File.open('save.txt', 'w') {|f|
http.get('/~foo/'......, nil) do |str|
f.write str
end
}
//}
@see Net::HTTP#request_get... -
StringScanner
# get _ byte -> String | nil (6155.0) -
1 バイトスキャンして文字列で返します。 スキャンポインタをその後ろに進めます。 スキャンポインタが文字列の末尾を指すなら nil を返します。
...Scanner#getbyte は将来のバージョンで削除される予定です。
代わりに StringScanner#get_byte を使ってください。
//emlist[例][ruby]{
require 'strscan'
utf8 = "\u{308B 3073 3044}"
s = StringScanner.new(utf8.encode("EUC-JP"))
p s.get_byte #=> "\xA4"
p s.get_byte......#=> "\xEB"
p s.get_byte #=> "\xA4"
p s.get_byte #=> "\xD3"
p s.get_byte #=> "\xA4"
p s.get_byte #=> "\xA4"
p s.get_byte #=> nil
//}... -
StringScanner
# getbyte -> String | nil (6155.0) -
1 バイトスキャンして文字列で返します。 スキャンポインタをその後ろに進めます。 スキャンポインタが文字列の末尾を指すなら nil を返します。
...Scanner#getbyte は将来のバージョンで削除される予定です。
代わりに StringScanner#get_byte を使ってください。
//emlist[例][ruby]{
require 'strscan'
utf8 = "\u{308B 3073 3044}"
s = StringScanner.new(utf8.encode("EUC-JP"))
p s.get_byte #=> "\xA4"
p s.get_byte......#=> "\xEB"
p s.get_byte #=> "\xA4"
p s.get_byte #=> "\xD3"
p s.get_byte #=> "\xA4"
p s.get_byte #=> "\xA4"
p s.get_byte #=> nil
//}... -
Module
# const _ get(name , inherit = true) -> object (6137.0) -
name で指定される名前の定数の値を取り出します。
...す。
//emlist[例][ruby]{
module Bar
BAR = 1
end
class Object
include Bar
end
# Object では include されたモジュールに定義された定数を見付ける
p Object.const_get(:BAR) # => 1
class Baz
include Bar
end
# Object以外でも同様
p Baz.const_get(:BAR) # => 1
#......定義されていない定数
p Baz.const_get(:NOT_DEFINED) #=> raise NameError
# 第二引数に false を指定すると自分自身に定義された定数から探す
p Baz.const_get(:BAR, false) #=> raise NameError
# 完全修飾名を指定すると include や自分自身へ定義されて......いない場合でも参照できる
p Class.const_get("Bar::BAR") # => 1
//}... -
REXML
:: Attributes # get _ attribute _ ns(namespace , name) -> REXML :: Attribute | nil (6137.0) -
namespace と name で特定される属性を返します。
...字列)
//emlist[][ruby]{
require '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
a.attributes.get_attribute_ns("", "at......t") # => att='<'
a.attributes.get_attribute_ns("http://example.org/foo", "att") # => foo:att='1'
a.attributes.get_attribute_ns("http://example.org/baz", "att") # => nil
a.attributes.get_attribute_ns("http://example.org/foo", "attt") # => nil
//}... -
Net
:: HTTP # get2(path , header = nil) -> Net :: HTTPResponse (6134.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...HTTP ヘッダをハッシュで指定します。
//emlist[例][ruby]{
# example
response = http.request_get('/index.html')
p response['content-type']
puts response.body # body is already read
# using block
http.request_get('/index.html') {|response|
p response['content-type']
respon......se.read_body do |str| # read body now
print str
end
}
//}
get2 は時代遅れなので使わないでください。
@see Net::HTTP#get, Net::HTTPResponse#read_body... -
Net
:: HTTP # get2(path , header = nil) {|response| . . . . } -> Net :: HTTPResponse (6134.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...HTTP ヘッダをハッシュで指定します。
//emlist[例][ruby]{
# example
response = http.request_get('/index.html')
p response['content-type']
puts response.body # body is already read
# using block
http.request_get('/index.html') {|response|
p response['content-type']
respon......se.read_body do |str| # read body now
print str
end
}
//}
get2 は時代遅れなので使わないでください。
@see Net::HTTP#get, Net::HTTPResponse#read_body... -
Net
:: HTTP # request _ get(path , header = nil) -> Net :: HTTPResponse (6134.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...HTTP ヘッダをハッシュで指定します。
//emlist[例][ruby]{
# example
response = http.request_get('/index.html')
p response['content-type']
puts response.body # body is already read
# using block
http.request_get('/index.html') {|response|
p response['content-type']
respon......se.read_body do |str| # read body now
print str
end
}
//}
get2 は時代遅れなので使わないでください。
@see Net::HTTP#get, Net::HTTPResponse#read_body...