444件ヒット
[1-100件を表示]
(0.056秒)
別のキーワード
ライブラリ
- ビルトイン (144)
- csv (36)
-
net
/ http (180) -
rake
/ packagetask (84)
クラス
- Binding (48)
- CSV (36)
- Exception (24)
- Module (24)
-
Net
:: HTTP (108) -
Net
:: HTTPResponse (36) - Object (24)
-
Rake
:: PackageTask (84) - Thread (24)
モジュール
-
Net
:: HTTPHeader (36)
キーワード
- == (12)
- [] (12)
-
backtrace
_ locations (12) -
class
_ variable _ get (12) -
const
_ get (12) - eval (12)
- fetch (36)
- get2 (24)
- gets (12)
-
instance
_ variable _ defined? (12) -
instance
_ variable _ get (12) -
local
_ host= (12) -
local
_ port= (12) -
local
_ variable _ defined? (12) -
local
_ variable _ get (12) -
local
_ variable _ set (12) - name= (12)
-
need
_ tar= (12) -
need
_ tar _ bz2= (12) -
need
_ tar _ gz= (12) -
need
_ zip= (12) -
package
_ dir= (12) -
package
_ files= (12) -
read
_ body (24) - readline (12)
-
request
_ get (24) -
send
_ request (12) - shift (12)
-
thread
_ variable _ set (12) - value (12)
検索結果
先頭5件
- Net
:: HTTP # get(path , header = nil , dest = nil) -> Net :: HTTPResponse - Net
:: HTTP # get(path , header = nil , dest = nil) {|body _ segment| . . . . } -> Net :: HTTPResponse - Module
# const _ get(name , inherit = true) -> object - Net
:: HTTP # get2(path , header = nil) -> Net :: HTTPResponse - Net
:: HTTP # get2(path , header = nil) {|response| . . . . } -> Net :: HTTPResponse
-
Net
:: HTTP # get(path , header = nil , dest = nil) -> Net :: HTTPResponse (18169.0) -
サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。
...て順次
「dest << ボディの断片」を実行します。
@param path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
@param dest 利用しないでください。
1.1 互換モード......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 (18169.0) -
サーバ上の path にあるエンティティを取得し、 Net::HTTPResponse のインスタンスとして返します。
...て順次
「dest << ボディの断片」を実行します。
@param path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
@param dest 利用しないでください。
1.1 互換モード......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... -
Module
# const _ get(name , inherit = true) -> object (6174.0) -
name で指定される名前の定数の値を取り出します。
...とはありません。
@param name 定数名。String か Symbol で指定します。
完全修飾名を指定しなかった場合はモジュールに定義されている
name で指定される名前の定数の値を取り出します。
@param inherit false を指......なりません。
@raise NameError 定数が定義されていないときに発生します。
//emlist[例][ruby]{
module Bar
BAR = 1
end
class Object
include Bar
end
# Object では include されたモジュールに定義された定数を見付ける
p Object.const_get(:BAR) # => 1
c......lass 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... -
Net
:: HTTP # get2(path , header = nil) -> Net :: HTTPResponse (6159.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...にはこれを利用します。
@param path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
//emlist[例][ruby]{
# example
response = http.request_get('/index.html')
p response['content-t......# body is already read
# using block
http.request_get('/index.html') {|response|
p response['content-type']
response.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 (6159.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...にはこれを利用します。
@param path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
//emlist[例][ruby]{
# example
response = http.request_get('/index.html')
p response['content-t......# body is already read
# using block
http.request_get('/index.html') {|response|
p response['content-type']
response.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 (6159.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...にはこれを利用します。
@param path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
//emlist[例][ruby]{
# example
response = http.request_get('/index.html')
p response['content-t......# body is already read
# using block
http.request_get('/index.html') {|response|
p response['content-type']
response.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) {|response| . . . . } -> Net :: HTTPResponse (6159.0) -
サーバ上の path にあるエンティティを取得します。 Net::HTTPResponse オブジェクトを返します。
...にはこれを利用します。
@param path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
//emlist[例][ruby]{
# example
response = http.request_get('/index.html')
p response['content-t......# body is already read
# using block
http.request_get('/index.html') {|response|
p response['content-type']
response.read_body do |str| # read body now
print str
end
}
//}
get2 は時代遅れなので使わないでください。
@see Net::HTTP#get, Net::HTTPResponse#read_body... -
Object
# instance _ variable _ get(var) -> object | nil (6156.0) -
オブジェクトのインスタンス変数の値を取得して返します。
...。
@param var インスタンス変数名を文字列か Symbol で指定します。
//emlist[][ruby]{
class Foo
def initialize
@foo = 1
end
end
obj = Foo.new
p obj.instance_variable_get("@foo") #=> 1
p obj.instance_variable_get(:@foo) #=> 1
p obj.instance_variable_get(:@bar)......#=> nil
//}
@see Object#instance_variable_set,Object#instance_variables,Object#instance_variable_defined?... -
Binding
# local _ variable _ get(symbol) -> object (6150.0) -
引数 symbol で指定した名前のローカル変数に設定された値を返します。
...を返します。
@param symbol ローカル変数名を Symbol オブジェクトで指定します。
@raise NameError 引数 symbol で指定したローカル変数が未定義の場合に発生します。
//emlist[例][ruby]{
def foo
a = 1
binding.local_variable_get(:a) # => 1
bindin......g.local_variable_get(:b) # => NameError
end
//}
このメソッドは以下のコードの短縮形です。
//emlist[][ruby]{
binding.eval("#{symbol}")
//}
@see Binding#local_variable_set, Binding#local_variable_defined?...