1344件ヒット
[1301-1344件を表示]
(0.091秒)
別のキーワード
ライブラリ
- ビルトイン (318)
- etc (12)
-
irb
/ cmd / load (24) -
json
/ add / exception (12) - logger (12)
- mkmf (12)
-
net
/ http (276) - optparse (24)
- pathname (450)
- rake (48)
-
rake
/ packagetask (12) -
rexml
/ document (72) - rubygems (12)
-
rubygems
/ custom _ require (12) -
rubygems
/ gem _ path _ searcher (12) - socket (24)
- win32ole (12)
クラス
-
ARGF
. class (24) - Addrinfo (24)
- Dir (24)
-
Encoding
:: Converter (12) - Exception (24)
- File (24)
-
File
:: Stat (24) -
Gem
:: GemPathSearcher (12) - IO (54)
-
IRB
:: ExtendCommand :: Load (12) -
IRB
:: ExtendCommand :: Source (12) - Logger (12)
-
Net
:: HTTP (216) -
Net
:: HTTPGenericRequest (36) -
Net
:: HTTPResponse (24) - OptionParser (24)
- Pathname (450)
- Proc (12)
-
REXML
:: Element (36) -
REXML
:: Elements (36) -
Rake
:: Application (12) -
Rake
:: DefaultLoader (12) -
Rake
:: FileList (12) -
Rake
:: PackageTask (12) -
RubyVM
:: InstructionSequence (48) - Thread (24)
-
Thread
:: Backtrace :: Location (48) - TracePoint (24)
-
WIN32OLE
_ TYPELIB (12)
モジュール
- Kernel (36)
-
Rake
:: TaskManager (12)
キーワード
- + (12)
-
/ (11) - <=> (24)
- == (12)
- === (12)
-
absolute
_ path (24) - ascend (12)
-
backtrace
_ locations (24) - binread (12)
-
body
_ stream (12) -
body
_ stream= (12) - children (12)
- chown (12)
- cleanpath (12)
- convpath (12)
-
create
_ makefile (12) -
create
_ rule (12) - delete (12)
-
delete
_ all (12) - descend (12)
- dirname (12)
- each (12)
-
each
_ child (24) -
each
_ entry (15) -
each
_ line (24) - entries (12)
- eql? (12)
- execute (24)
-
family
_ addrinfo (24) - filename (12)
- fnmatch (12)
- formatter (12)
- gem (12)
- get (24)
- get2 (24)
-
get
_ text (12) - glob (16)
- head (12)
- head2 (24)
- inspect (36)
- join (12)
-
lib
_ dirs _ for (12) - load (12)
-
original
_ dir (12) -
package
_ dir _ path (12) - parent (12)
- pathconf (12)
- pathmap (12)
- post (24)
- post2 (24)
-
program
_ name (12) -
program
_ name= (12) -
read
_ body (24) - realdirpath (12)
- realpath (24)
- relative? (12)
-
relative
_ path _ from (12) - reopen (36)
-
request
_ get (24) -
request
_ head (24) -
request
_ post (24) - require (12)
- root? (12)
-
send
_ request (12) -
set
_ backtrace (12) - size? (12)
-
source
_ location (12) - split (12)
- sub (24)
-
sub
_ ext (12) - text (12)
-
to
_ a (24) -
to
_ json (12) -
to
_ path (27) -
to
_ s (24) - unlink (12)
- xpath (12)
検索結果
先頭4件
-
Net
:: HTTP # head(path , header = nil) -> Net :: HTTPResponse (230.0) -
サーバ上の path にあるエンティティのヘッダのみを取得します。 Net::HTTPResponse のインスタンスを返します。
...サーバ上の path にあるエンティティのヘッダのみを取得します。
Net::HTTPResponse のインスタンスを返します。
header が nil
でなければ、リクエストを送るときにその内容を HTTP ヘッダとして
送ります。 header は { 'Accept' = > '*/*......aram path 取得するエンティティのパスを文字列で指定します。
@param header リクエストの HTTP ヘッダをハッシュで指定します。
1.1 互換モードの場合は、レスポンスに応じて例外が発生します。
//emlist[例][ruby]{
require 'net/http'
r......esponse = nil
Net::HTTP.start('some.www.server', 80) {|http|
response = http.head('/index.html')
}
p response['content-type']
//}
@see Net::HTTP#request_head... -
File
:: Stat # <=>(o) -> Integer | nil (143.0) -
ファイルの最終更新時刻を比較します。self が other よりも 新しければ正の数を、等しければ 0 を古ければ負の数を返します。 比較できない場合は nil を返します。
...her よりも
新しければ正の数を、等しければ 0 を古ければ負の数を返します。
比較できない場合は nil を返します。
@param o File::Stat のインスタンスを指定します。
//emlist[][ruby]{
require 'tempfile' # for Tempfile
fp1 = Tempfile.open("first......")
fp1.print "古い方\n"
sleep(1)
fp2 = Tempfile.open("second")
fp2.print "新しい方\n"
p File::Stat.new(fp1.path) <=> File::Stat.new(fp2.path) #=> -1
p File::Stat.new(fp2.path) <=> File::Stat.new(fp1.path) #=> 1
p File::Stat.new(fp1.path) <=> fp2.path #=> nil
//}... -
File
:: Stat # size? -> Integer | nil (125.0) -
サイズが0の時にはnil、それ以外の場合はファイルサイズを返します。
...はnil、それ以外の場合はファイルサイズを返します。
//emlist[][ruby]{
require 'tempfile'
fp = Tempfile.new("temp")
p fp.size #=> 0
p File::Stat.new(fp.path).size? #=> nil
fp.print "not 0 "
fp.close
p FileTest.exist?(fp.path) #=> true
p File::Stat.new(fp.path).size? #=> 6
//}... -
Exception
# to _ json(*args) -> String (119.0) -
自身を JSON 形式の文字列に変換して返します。
...erator::GeneratorMethods::Hash#to_json を呼び出しています。
@param args 引数はそのまま JSON::Generator::GeneratorMethods::Hash#to_json に渡されます。
//emlist[例][ruby]{
require "json/add/core"
begin
0/0
rescue => e
e.to_json # => "{\"json_class\":\"ZeroDivisionError\......",\"m\":\"divided by 0\",\"b\":[\"/path/to/test.rb:4:in `/'\",\"/path/to/test.rb:4:in `<main>'\"]}"
end
//}
@see JSON::Generator::GeneratorMethods::Hash#to_json...