ライブラリ
- ビルトイン (307)
- benchmark (1)
- bigdecimal (18)
-
bigdecimal
/ util (1) -
cgi
/ core (2) - csv (17)
- date (19)
- dbm (2)
- digest (4)
-
digest
/ sha2 (2) - drb (3)
-
drb
/ timeridconv (1) - etc (8)
- fiddle (17)
-
fiddle
/ import (2) - gdbm (2)
- getoptlong (1)
-
io
/ console (1) -
io
/ wait (1) - ipaddr (4)
-
irb
/ context (3) -
irb
/ ext / history (2) -
irb
/ ext / save-history (2) -
irb
/ frame (2) - json (5)
- logger (4)
- mathn (1)
- matrix (23)
- mkmf (8)
-
net
/ ftp (3) -
net
/ http (15) -
net
/ imap (16) -
net
/ pop (8) -
net
/ smtp (3) - observer (1)
- openssl (48)
- optparse (13)
- ostruct (1)
- pathname (12)
- prettyprint (2)
- prime (11)
- psych (13)
-
rdoc
/ stats (4) - resolv (10)
- resolv-replace (3)
- rexml (3)
-
rexml
/ document (11) -
rinda
/ rinda (1) -
rinda
/ tuplespace (1) - ripper (2)
-
ripper
/ filter (2) -
ripper
/ lexer (2) - rubygems (1)
-
rubygems
/ config _ file (1) -
rubygems
/ dependency (1) -
rubygems
/ package / tar _ header (9) -
rubygems
/ package / tar _ reader (1) -
rubygems
/ package / tar _ reader / entry (2) -
rubygems
/ package / tar _ writer (4) -
rubygems
/ remote _ fetcher (1) -
rubygems
/ source _ index (3) -
rubygems
/ source _ info _ cache _ entry (1) -
rubygems
/ specification (1) -
rubygems
/ user _ interaction (2) - scanf (2)
- sdbm (2)
- set (3)
- shell (12)
-
shell
/ command-processor (9) -
shell
/ filter (9) -
shell
/ process-controller (2) -
shell
/ system-command (1) - socket (32)
- stringio (11)
- strscan (11)
- sync (1)
-
syslog
/ logger (1) - tempfile (2)
- tracer (1)
- uri (1)
-
webrick
/ httprequest (1) -
webrick
/ httpresponse (4) -
webrick
/ httpservlet / filehandler (1) -
webrick
/ httpversion (4) -
webrick
/ log (2) -
win32
/ registry (2) - win32ole (18)
- zlib (17)
クラス
-
ARGF
. class (8) - Addrinfo (6)
- Array (22)
- BasicObject (1)
- BasicSocket (6)
-
Benchmark
:: Job (1) - BigDecimal (18)
- CSV (10)
-
CSV
:: FieldInfo (2) -
CSV
:: Row (3) -
CSV
:: Table (2) - Complex (2)
- DBM (2)
-
DRb
:: DRbIdConv (1) -
DRb
:: DRbObject (1) -
DRb
:: DRbServer (1) -
DRb
:: TimerIdConv (1) - Date (14)
- DateTime (5)
-
Digest
:: Base (4) -
Digest
:: SHA2 (2) - Dir (3)
-
Encoding
:: Converter (4) - Enumerator (1)
-
Etc
:: Group (1) -
Etc
:: Passwd (6) -
Fiddle
:: CStruct (1) -
Fiddle
:: Closure (3) -
Fiddle
:: Function (4) -
Fiddle
:: Handle (4) -
Fiddle
:: Pointer (6) - File (1)
-
File
:: Stat (17) - Float (9)
- GDBM (2)
-
Gem
:: ConfigFile (1) -
Gem
:: Dependency (1) -
Gem
:: Package :: TarHeader (9) -
Gem
:: Package :: TarReader (1) -
Gem
:: Package :: TarReader :: Entry (2) -
Gem
:: Package :: TarWriter :: BoundedStream (3) -
Gem
:: Package :: TarWriter :: RestrictedStream (1) -
Gem
:: RemoteFetcher (1) -
Gem
:: SourceIndex (3) -
Gem
:: SourceInfoCacheEntry (1) -
Gem
:: Specification (1) -
Gem
:: StreamUI :: SimpleProgressReporter (1) -
Gem
:: StreamUI :: VerboseProgressReporter (1) - GetoptLong (1)
- Hash (3)
- IO (18)
- IPAddr (4)
-
IRB
:: Context (7) -
IRB
:: Frame (2) - Integer (70)
-
JSON
:: State (4) - Logger (3)
-
Logger
:: LogDevice (1) - MatchData (7)
- Matrix (19)
-
Matrix
:: LUPDecomposition (1) - Method (3)
- Module (2)
-
Net
:: FTP (1) -
Net
:: FTP :: MLSxEntry (2) -
Net
:: HTTP (11) -
Net
:: IMAP (6) -
Net
:: IMAP :: BodyTypeBasic (1) -
Net
:: IMAP :: BodyTypeMessage (2) -
Net
:: IMAP :: BodyTypeText (2) -
Net
:: IMAP :: FetchData (1) -
Net
:: IMAP :: MailboxQuota (2) -
Net
:: IMAP :: StatusData (1) -
Net
:: IMAP :: ThreadMember (1) -
Net
:: POP3 (5) -
Net
:: POPMail (3) -
Net
:: SMTP (3) - NilClass (1)
- Numeric (19)
- Object (7)
-
OpenSSL
:: ASN1 :: ASN1Data (1) -
OpenSSL
:: BN (5) -
OpenSSL
:: Cipher (3) -
OpenSSL
:: Digest (2) -
OpenSSL
:: OCSP :: BasicResponse (2) -
OpenSSL
:: OCSP :: Request (1) -
OpenSSL
:: OCSP :: Response (1) -
OpenSSL
:: PKCS7 :: RecipientInfo (1) -
OpenSSL
:: PKCS7 :: SignerInfo (1) -
OpenSSL
:: PKey :: DH (1) -
OpenSSL
:: PKey :: EC :: Group (2) -
OpenSSL
:: SSL :: SSLContext (9) -
OpenSSL
:: SSL :: SSLSocket (4) -
OpenSSL
:: SSL :: Session (1) -
OpenSSL
:: X509 :: CRL (1) -
OpenSSL
:: X509 :: Certificate (2) -
OpenSSL
:: X509 :: Name (2) -
OpenSSL
:: X509 :: Request (1) -
OpenSSL
:: X509 :: Store (1) -
OpenSSL
:: X509 :: StoreContext (2) - OpenStruct (1)
- OptionParser (13)
- Pathname (12)
- PrettyPrint (2)
- Prime (2)
-
Prime
:: EratosthenesGenerator (2) -
Prime
:: Generator23 (2) -
Prime
:: PseudoPrimeGenerator (1) -
Prime
:: TrialDivisionGenerator (2) - Proc (3)
-
Process
:: Status (7) -
Psych
:: Emitter (2) -
Psych
:: Nodes :: Document (1) -
Psych
:: Nodes :: Mapping (1) -
Psych
:: Nodes :: Scalar (1) -
Psych
:: Nodes :: Sequence (1) -
Psych
:: Nodes :: Stream (1) -
Psych
:: Parser :: Mark (3) -
Psych
:: SyntaxError (3) -
RDoc
:: Options (2) -
RDoc
:: Stats (4) -
REXML
:: Attributes (2) -
REXML
:: Elements (2) -
REXML
:: Formatters :: Pretty (1) -
REXML
:: Parent (6) -
REXML
:: ParseException (3) - Random (6)
- Range (2)
- Rational (8)
- Regexp (5)
-
Resolv
:: DNS :: Resource :: IN :: SRV (3) -
Resolv
:: DNS :: Resource :: IN :: WKS (1) -
Resolv
:: DNS :: Resource :: MX (1) -
Resolv
:: DNS :: Resource :: SOA (5) -
Rinda
:: SimpleRenewer (1) -
Rinda
:: TupleEntry (1) - Ripper (2)
-
Ripper
:: Filter (2) -
Ripper
:: Lexer (2) -
RubyVM
:: InstructionSequence (1) - SDBM (2)
- Set (3)
- Shell (12)
-
Shell
:: CommandProcessor (9) -
Shell
:: Filter (9) -
Shell
:: ProcessController (2) -
Shell
:: SystemCommand (1) - SignalException (1)
-
Socket
:: AncillaryData (7) -
Socket
:: Ifaddr (2) -
Socket
:: Option (5) - String (28)
- StringIO (11)
- StringScanner (11)
- Struct (6)
- Symbol (3)
-
Syslog
:: Logger (1) - SystemCallError (1)
- SystemExit (1)
- TCPServer (1)
- Tempfile (2)
- Thread (5)
-
Thread
:: Backtrace :: Location (1) -
Thread
:: Mutex (1) -
Thread
:: Queue (3) -
Thread
:: SizedQueue (1) - Time (21)
- TracePoint (1)
- Tracer (1)
- UDPSocket (6)
- UNIXServer (1)
- UNIXSocket (1)
-
URI
:: Generic (1) - UnboundMethod (4)
- Vector (3)
-
WEBrick
:: BasicLog (2) -
WEBrick
:: Cookie (4) -
WEBrick
:: HTTPRequest (1) -
WEBrick
:: HTTPResponse (4) -
WEBrick
:: HTTPServlet :: DefaultFileHandler (1) -
WEBrick
:: HTTPVersion (4) -
WIN32OLE
_ METHOD (7) -
WIN32OLE
_ TYPE (4) -
WIN32OLE
_ TYPELIB (2) -
WIN32OLE
_ VARIABLE (2) -
WIN32OLE
_ VARIANT (3) -
Win32
:: Registry (2) -
Zlib
:: GzipFile (3) -
Zlib
:: GzipReader (5) -
Zlib
:: GzipWriter (3) -
Zlib
:: ZStream (6)
モジュール
-
CGI
:: QueryExtension (2) - Enumerable (10)
-
Fiddle
:: Importer (1) -
Gem
:: QuickLoader (1) -
JSON
:: Generator :: GeneratorMethods :: Integer (1) - Kernel (8)
-
Net
:: HTTPHeader (4) - Observable (1)
-
OpenSSL
:: Buffering (3) -
OpenSSL
:: SSL :: SocketForwarder (1) -
Sync
_ m (1)
キーワード
- % (2)
- & (2)
- * (1)
- ** (1)
- + (1)
- - (1)
- -@ (2)
-
/ (2) - < (1)
- << (4)
- <= (1)
- <=> (6)
- == (1)
- === (1)
- =~ (3)
- > (1)
- >= (1)
- >> (2)
- [] (10)
- []= (5)
- ^ (1)
-
_ _ drbref (1) -
_ _ id _ _ (1) - abi (1)
- abs (1)
-
add
_ trace _ func (1) - adler (1)
- afamily (1)
- age (1)
- args (1)
- arity (3)
-
asn1
_ flag (1) - attr (1)
-
avail
_ in (1) -
avail
_ out (1) -
back
_ trace _ limit (1) -
back
_ trace _ limit= (1) - begin (1)
- bind (1)
- binwrite (1)
-
bit
_ length (1) - blksize (1)
-
block
_ length (3) -
block
_ size (1) - blocks (1)
- bottom (1)
-
bsearch
_ index (2) -
buffer
_ initial _ length (1) -
bulk
_ threshold (1) - bytes (2)
-
bytes
_ read (1) - bytesize (1)
-
calculate
_ integers _ for _ gem _ version (1) - call (1)
- ceil (6)
- change (1)
- charpos (1)
-
check
_ nonce (1) -
check
_ signedness (2) -
check
_ sizeof (2) - checksum (1)
- chmod (4)
- chown (4)
- chr (3)
- cipher (1)
- ciphers (1)
- class (1)
- classify (1)
- close (1)
- codepoints (2)
- coerce (2)
- cofactor (1)
-
cofactor
_ expansion (1) - column (4)
-
column
_ count (1) -
column
_ size (1) -
compute
_ key (1) - concat (2)
- connect (1)
-
const
_ source _ location (1) -
content
_ length (4) -
content
_ length= (1) - context (1)
-
continue
_ timeout (1) - converters (1)
-
convertible
_ int (2) -
copy
_ nonce (1) - count (9)
-
count
_ observers (1) -
coverage
_ report (1) - crc (1)
- ctype (1)
- cwday (1)
- cweek (1)
- cwyear (1)
-
data
_ type (1) - day (2)
- debug (1)
- debug? (1)
-
debug
_ level (1) -
default
_ port (1) - degree (1)
- delete (4)
- denominator (5)
- depth (1)
- depth= (1)
-
dev
_ major (1) -
dev
_ minor (1) - devmajor (1)
- devminor (1)
- dig (1)
-
digest
_ length (3) - digits (2)
- dispid (1)
- div (2)
- divmod (1)
- downto (2)
-
elements
_ to _ i (2) - encoding (1)
- end (1)
- errno (1)
- error (2)
-
error
_ depth (1) -
eval
_ history (1) -
eval
_ history= (1) - even? (1)
- exist? (1)
- exitstatus (1)
- expire (2)
- exponent (1)
- expunge (1)
- facts (1)
- family (3)
- fcntl (3)
- fdiv (1)
-
fetch
_ size (1) -
field
_ size _ limit (1) - fileno (4)
-
find
_ index (9) -
first
_ lineno (1) - flags (1)
- floor (6)
- gcd (1)
- gcdlcm (1)
-
get
_ thread _ no (1) - getbyte (4)
- getc (1)
- getpeereid (1)
- gid (4)
-
gmt
_ offset (1) - gmtoff (1)
- hash (20)
-
hash
_ old (1) - helpcontext (2)
- hex (1)
- hour (2)
- ifindex (1)
- indent (1)
- indentation (1)
- index (12)
- ino (1)
- inspect (1)
- int (2)
-
int
_ from _ prime _ division (1) - integer? (2)
- invkind (1)
- ioctl (2)
-
ip
_ pktinfo (1) -
ip
_ port (1) -
ip
_ unpack (1) -
ipv6
_ pktinfo (1) -
ipv6
_ pktinfo _ ifindex (1) -
iv
_ len (1) - jd (1)
-
keep
_ alive _ timeout (1) -
key
_ len (1) - kill (2)
-
kill
_ job (1) -
laplace
_ expansion (1) - lchmod (1)
- lchown (1)
- lcm (1)
- ld (1)
- left (1)
- length (21)
- level (6)
- level= (1)
- lex (1)
- limit (1)
- line (4)
-
line
_ width (1) - lineno (9)
- lines (2)
- linger (1)
-
local
_ port (1) - magnitude (1)
- major (1)
- major= (1)
-
major
_ version (2) - match? (1)
-
matched
_ size (1) - matchedsize (1)
- max (1)
-
max
_ age (1) -
max
_ age= (1) -
max
_ nesting (1) - maxwidth (1)
- mday (2)
- method (1)
- min (2)
- minimum (1)
- minor (1)
- minor= (1)
-
minor
_ version (2) - minute (1)
- mjd (1)
- mode (2)
- modulo (1)
- mon (2)
- month (2)
- mtime (1)
-
n
_ bytes (1) -
n
_ mails (1) -
named
_ captures (1) - next (4)
- nlink (1)
- nread (1)
- nsec (1)
-
num
_ bits (1) -
num
_ bytes (1) -
num
_ classes (1) -
num
_ files (1) -
num
_ methods (1) -
num
_ modules (1) -
num
_ waiting (1) - number (1)
- numerator (4)
-
object
_ id (1) - oct (1)
- odd? (1)
- offset (3)
-
offset
_ vtbl (1) -
ole
_ type _ detail (1) - on (12)
-
open
_ timeout (3) - optname (1)
- ord (2)
- ordering (1)
-
os
_ code (1) - owner (1)
- pack (2)
- parse (1)
- pathconf (1)
- pending (1)
- pfamily (1)
- pid (3)
- pivots (1)
- pointer (1)
- port (4)
- pos (9)
- position (1)
- pow (2)
- precs (1)
- pred (1)
- preference (1)
-
prepare
_ range (1) - prime? (1)
-
prime
_ division (2) -
primitive
_ convert (4) - priority (2)
- priority= (1)
- protocol (2)
-
proxy
_ port (1) - proxyport (1)
- ptr (1)
-
public
_ method (1) - quota (2)
- rand (3)
-
range
_ length (1) - rank (1)
-
rank
_ e (1) - rationalize (2)
- rdev (1)
-
rdev
_ major (1) -
rdev
_ minor (1) - read (1)
-
read
_ timeout (3) - readbyte (3)
- readchar (1)
- real? (1)
-
recv
_ io (1) - recvmsg (1)
-
recvmsg
_ nonblock (1) - refresh (1)
- remainder (1)
- renew (1)
-
rest
_ size (1) - restsize (1)
- retry (1)
-
return
_ vtype (1) - rewind (1)
- rindex (4)
- rm (3)
- round (8)
-
row
_ count (1) -
row
_ size (1) -
safe
_ level (2) -
save
_ history (1) -
save
_ history= (1) - scanf (2)
- search (1)
- sec (2)
- second (1)
- seed (1)
- send (5)
- sendmsg (1)
-
sendmsg
_ nonblock (1) -
sent
_ size (1) - seqno (2)
- serial (4)
-
server
_ port (1) -
session
_ cache _ mode (1) -
session
_ cache _ size (1) -
session
_ cache _ stats (1) -
set
_ trace _ func (1) - setbyte (1)
-
sev
_ threshold (1) - sfork (1)
- sign (1)
- signo (1)
-
singleton
_ class (1) - size (42)
- size? (4)
-
size
_ opt _ params (1) -
size
_ params (1) - sizeof (1)
- skip (1)
-
skip
_ until (1) - sleep (1)
- socktype (1)
- sort (1)
-
sort
_ by (2) -
source
_ location (3) -
specification
_ version (1) - split (1)
-
ssl
_ timeout (2) - start (1)
- state (1)
- status (5)
- step (6)
- stopsig (1)
- style (3)
- subsec (1)
- succ (4)
- sum (5)
-
summary
_ width (1) - sym (1)
-
sync
_ ex _ count (1) - sysaccept (2)
- sysopen (1)
- sysseek (1)
- syswrite (3)
-
tab
_ width (1) - tag (1)
- tell (7)
- termsig (1)
- test (3)
- timeout (2)
- times (2)
-
to
_ a (1) -
to
_ bn (1) -
to
_ d (1) -
to
_ f (2) -
to
_ i (19) -
to
_ id (2) -
to
_ int (6) -
to
_ json (1) -
to
_ r (1) -
to
_ s (3) - top (1)
-
total
_ in (1) -
total
_ out (1) - tr (1)
- trace (1)
- truncate (7)
-
try
_ constant (2) -
tv
_ nsec (1) -
tv
_ sec (1) -
tv
_ usec (1) - type (1)
- typekind (1)
- uid (3)
-
uid
_ search (1) -
uid
_ sort (1) - ungetc (1)
- unlink (1)
- unpack (1)
-
upper
_ bound (1) - upto (2)
- usage (1)
- usec (1)
-
utc
_ offset (1) - utime (4)
-
values
_ at (1) - varkind (1)
- vartype (1)
-
verify
_ depth (2) -
verify
_ mode (2) -
verify
_ result (1) - version (6)
- version= (1)
- wday (2)
- weight (1)
- width (2)
- winsize (1)
-
world
_ readable? (1) -
world
_ writable? (1) - write (9)
-
write
_ nonblock (3) - written (1)
- yday (2)
- year (2)
- | (1)
- ~ (2)
検索結果
先頭5件
-
Gem
:: SourceIndex # size -> Integer (307.0) -
自身のサイズを返します。
自身のサイズを返します。 -
Gem
:: SourceInfoCacheEntry # size -> Integer (307.0) -
ソースエントリのサイズです。
ソースエントリのサイズです。
ソースインデックスが変化したことを検出するために使用します。 -
Gem
:: Specification # specification _ version -> Integer (307.0) -
この Gem パッケージに用いられている gemspec のバージョンを返します。
この Gem パッケージに用いられている gemspec のバージョンを返します。 -
Gem
:: StreamUI :: SimpleProgressReporter # count -> Integer (307.0) -
Gem::StreamUI::SimpleProgressReporter#updated が呼び出された回数を返します。
Gem::StreamUI::SimpleProgressReporter#updated が呼び出された回数を返します。 -
Gem
:: StreamUI :: VerboseProgressReporter # count -> Integer (307.0) -
Gem::StreamUI::VerboseProgressReporter#updated が呼び出された回数を返します。
Gem::StreamUI::VerboseProgressReporter#updated が呼び出された回数を返します。 -
GetoptLong
# ordering -> Integer (307.0) -
現在の順序形式を返します。
現在の順序形式を返します。 -
Hash
# hash -> Integer (307.0) -
自身が保持するキーと値のハッシュ値を元にして算出した整数を返します。 自身が保持するキーや値が変化すればこのメソッドが返す値も変化します。
自身が保持するキーと値のハッシュ値を元にして算出した整数を返します。
自身が保持するキーや値が変化すればこのメソッドが返す値も変化します。
//emlist[例][ruby]{
a = {}
p a.hash #=> 0
a[1] = :x
p a.hash #=> 329543
//} -
IO
# fcntl(cmd , arg = 0) -> Integer (307.0) -
IOに対してシステムコール fcntl を実行します。 機能の詳細は fcntl(2) を参照してください。 fcntl(2) が返した整数を返します。
IOに対してシステムコール fcntl を実行します。
機能の詳細は fcntl(2) を参照してください。
fcntl(2) が返した整数を返します。
@param cmd IO に対するコマンドを、添付ライブラリ fcntl が提供している定数で指定します。
@param arg cmd に対する引数を整数、文字列、booleanのいずれかで指定します。
整数の時にはその値を fcntl(2) に渡します。
文字列の場合には Array#pack した構造体だとみなして渡します。
arg が nil か false の... -
IO
# getbyte -> Integer | nil (307.0) -
IO から1バイトを読み込み整数として返します。 既に EOF に達していれば nil を返します。
IO から1バイトを読み込み整数として返します。
既に EOF に達していれば nil を返します。
f = File.new("testfile")
f.getbyte #=> 84
f.getbyte #=> 104 -
IO
# ioctl(cmd , arg = 0) -> Integer (307.0) -
IO に対してシステムコール ioctl を実行し、その結果を返します。 機能の詳細は ioctl(2) を参照してください。
IO に対してシステムコール ioctl を実行し、その結果を返します。
機能の詳細は ioctl(2) を参照してください。
@param cmd IO に対するコマンドを整数で指定します。どのようなコマンドが使えるかはプラットフォームに依存します。
@param arg cmd に対する引数を指定します。整数の時にはその値を ioctl に渡します。
文字列の場合には Array#pack した構造体だとみなして渡します。
arg が nil か false の場合には 0を、true の場合には 1 を渡します。
@raise IOEr... -
IO
# lineno -> Integer (307.0) -
現在の行番号を整数で返します。実際には IO#gets が呼ばれた回数です。 改行以外のセパレータで gets が呼ばれた場合など、実際の行番号と異なる場合があります。
現在の行番号を整数で返します。実際には IO#gets が呼ばれた回数です。
改行以外のセパレータで gets が呼ばれた場合など、実際の行番号と異なる場合があります。
@raise IOError 読み込み用にオープンされていなければ発生します。
f = File.new("testfile")
f.lineno #=> 0
f.gets #=> "This is line one\n"
f.lineno #=> 1
f.gets ... -
IO
# nread -> Integer (307.0) -
ブロックせずに読み込み可能なバイト数を返します。 ブロックする場合は0を返します。
ブロックせずに読み込み可能なバイト数を返します。
ブロックする場合は0を返します。
判別が不可能な場合は0を返します。 -
IO
# pathconf(name) -> Integer | nil (307.0) -
fpathconf(3) で取得したファイルの設定変数の値を返します。
fpathconf(3) で取得したファイルの設定変数の値を返します。
引数 name が制限に関する設定値であり、設定が制限がない状態の場合は nil
を返します。(fpathconf(3) が -1 を返し、errno が設定されていない
場合)
@param name Etc モジュールの PC_ で始まる定数のいずれかを指定します。
//emlist[][ruby]{
require 'etc'
IO.pipe {|r, w|
p w.pathconf(Etc::PC_PIPE_BUF) # => 4096
}
//} -
IO
# pid -> Integer | nil (307.0) -
自身が IO.popen で作られたIOポートなら、子プロセスのプロセス ID を 返します。それ以外は nil を返します。
自身が IO.popen で作られたIOポートなら、子プロセスのプロセス ID を
返します。それ以外は nil を返します。
@raise IOError 既に close されている場合に発生します。
//emlist[例][ruby]{
IO.popen("-") do |pipe|
if pipe
$stderr.puts "In parent, child pid is #{pipe.pid}" # => In parent, child pid is 16013
else
$stderr.puts "In child, pid is #{$$}" ... -
IO
# readbyte -> Integer (307.0) -
IO から1バイトを読み込み整数として返します。 既に EOF に達していれば EOFError が発生します。
IO から1バイトを読み込み整数として返します。
既に EOF に達していれば EOFError が発生します。
@raise EOFError 既に EOF に達している場合に発生します。
//emlist[例][ruby]{
IO.write("testfile", "123")
File.open("testfile") do |f|
begin
f.readbyte # => 49
f.readbyte # => 50
f.readbyte # => 51
f.readbyte # => 例外発生
rescue => e
e... -
IO
# sysseek(offset , whence = IO :: SEEK _ SET) -> Integer (307.0) -
lseek(2) と同じです。IO#seek では、 IO#sysread, IO#syswrite と併用すると正しく動作しないので代わりにこのメソッドを使います。 位置 offset への移動が成功すれば移動した位置(ファイル先頭からのオフセット)を返します。
lseek(2) と同じです。IO#seek では、
IO#sysread, IO#syswrite と併用すると正しく動作しないので代わりにこのメソッドを使います。
位置 offset への移動が成功すれば移動した位置(ファイル先頭からのオフセット)を返します。
書き込み用にバッファリングされた IO に対して実行すると警告が出ます。
File.open("/dev/zero") {|f|
buf = f.read(3)
f.sysseek(0)
}
# => -:3:in `sysseek': sysseek for buffered IO (IOErro... -
IO
# syswrite(string) -> Integer (307.0) -
write(2) を用いて string を出力します。 string が文字列でなければ to_s による文字列化を試みます。 実際に出力できたバイト数を返します。
write(2) を用いて string を出力します。
string が文字列でなければ to_s による文字列化を試みます。
実際に出力できたバイト数を返します。
stdio を経由しないので他の出力メソッドと混用すると思わぬ動作
をすることがあります。
@param string 自身に書き込みたい文字列を指定します。
@raise IOError 自身が書き込み用にオープンされていなければ発生します。
@raise Errno::EXXX 出力に失敗した場合に発生します。
//emlist[例][ruby]{
File.open("testfile", "w+") do |... -
IO
# write(str) -> Integer (307.0) -
IOポートに対して str を出力します。str が文字列でなけ れば to_s による文字列化を試みます。 実際に出力できたバイト数を返します。
IOポートに対して str を出力します。str が文字列でなけ
れば to_s による文字列化を試みます。
実際に出力できたバイト数を返します。
IO#syswrite を除く全ての出力メソッドは、最終的に
"write" という名のメソッドを呼び出すので、このメソッドを置き換える
ことで出力関数の挙動を変更することができます。
@param str 自身に書き込みたい文字列を指定します。
@raise IOError 自身が書き込み用にオープンされていなければ発生します。
@raise Errno::EXXX 出力に失敗した場合に発生します。
//emlist[例][ruby]... -
IO
# write _ nonblock(string , exception: true) -> Integer | :wait _ writable (307.0) -
IO をノンブロッキングモードに設定し、string を write(2) システムコールで書き出します。
IO をノンブロッキングモードに設定し、string を write(2) システムコールで書き出します。
write(2) が成功した場合、書き込んだ長さを返します。
EAGAIN, EINTR などは例外 Errno::EXXX として呼出元に報告されます。
書き込んだバイト数(つまり返り値)は String#bytesize の
値より小さい可能性があります。
発生した例外 がErrno::EAGAIN、 Errno::EWOULDBLOCK である場合は、
その例外オブジェクトに IO::WaitWritable が Object#extend
されます。よって IO::Wai... -
IPAddr
# family -> Integer (307.0) -
このオブジェクトのアドレスファミリを返します。
このオブジェクトのアドレスファミリを返します。
@see Socket -
IPAddr
# hash -> Integer (307.0) -
ハッシュ値を返します。
ハッシュ値を返します。
@see Object#hash -
IPAddr
# to _ i -> Integer (307.0) -
整数に変換します。
整数に変換します。
例:
require "ipaddr"
p IPAddr.new("0.0.1.0").to_i # => 256 -
IRB
:: Context # back _ trace _ limit -> Integer (307.0) -
エラー発生時のバックトレース表示の先頭、末尾の上限の行数を返します。
エラー発生時のバックトレース表示の先頭、末尾の上限の行数を返します。
デフォルト値は 16 です。
@see IRB::Context#back_trace_limit= -
IRB
:: Context # debug _ level -> Integer (307.0) -
irb のデバッグレベルを返します。
irb のデバッグレベルを返します。
デフォルト値は 0 です。
@see IRB::Context#debug_level=, IRB::Context#debug? -
JSON
:: State # max _ nesting -> Integer (307.0) -
生成される JSON 形式の文字列のネストの深さの最大値を返します。
生成される JSON 形式の文字列のネストの深さの最大値を返します。
この値がゼロである場合は、ネストの深さのチェックを行いません。
//emlist[例 ネストの深さチェックを行う][ruby]{
require "json"
json_state = JSON::State.new(max_nesting: 2)
json_state.max_nesting # => 2
JSON.generate([[]], json_state)
JSON.generate([[[]]], json_state) # => JSON::NestingError
//}
... -
Logger
# <<(msg) -> Integer | nil (307.0) -
ログを出力します。
ログを出力します。
@param msg ログに出力するメッセージ。
//emlist[例][ruby]{
require 'logger'
logger = Logger.new(STDOUT)
logger << "add message"
# => add message
//} -
Logger
:: LogDevice # write(message) -> Integer (307.0) -
出力先の IO オブジェクトにメッセージを書き込みます。
出力先の IO オブジェクトにメッセージを書き込みます。
このメソッドは同期されます。
@see IO#write -
MatchData
# begin(n) -> Integer | nil (307.0) -
n 番目の部分文字列先頭のオフセットを返します。
n 番目の部分文字列先頭のオフセットを返します。
0 はマッチ全体を意味します。
n 番目の部分文字列がマッチしていなければ nilを返します。
@param n 部分文字列を指定する数値。
@raise IndexError 範囲外の n を指定した場合に発生します。
//emlist[例][ruby]{
/(foo)(bar)(BAZ)?/ =~ "foobarbaz"
p $~.begin(0) # => 0
p $~.begin(1) # => 0
p $~.begin(2) # => 3
p $~.begin(3) # => nil
p $~.begin(4... -
MatchData
# end(n) -> Integer | nil (307.0) -
n 番目の部分文字列終端のオフセットを返します。
n 番目の部分文字列終端のオフセットを返します。
0 はマッチ全体を意味します。
n 番目の部分文字列がマッチしていなければ nil を返します。
@param n 部分文字列を指定する数値。
@raise IndexError 範囲外の n を指定した場合に発生します。
//emlist[例][ruby]{
/(foo)(bar)(BAZ)?/ =~ "foobarbaz"
p $~.end(0) # => 6
p $~.end(1) # => 3
p $~.end(2) # => 6
p $~.end(3) # => nil
p $~.end(4) # => ... -
MatchData
# hash -> Integer (307.0) -
self のマッチ対象になった文字列、元になった正規表現オブジェクト、マッチ した位置を元にハッシュ値を計算して返します。
self のマッチ対象になった文字列、元になった正規表現オブジェクト、マッチ
した位置を元にハッシュ値を計算して返します。 -
Matrix
# cofactor(row , column) -> Integer | Rational | Float (307.0) -
(row, column)-余因子を返します。
(row, column)-余因子を返します。
各要素の型によって返り値が変わります。
@param row 行
@param column 列
@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方でない場合に発生します。
@see Matrix#adjugate -
Matrix
# hash -> Integer (307.0) -
行列のHash値を返します。
行列のHash値を返します。 -
Matrix
# rank -> Integer (307.0) -
階数 (rank) を返します。
階数 (rank) を返します。
Float を使用すると、精度が不足するため、誤った結果が生じる可能性があることに注意してください。
代わりに、Rational や BigDecimal などの正確なオブジェクトを使用することを検討してください。
//emlist[][ruby]{
require 'matrix'
m = Matrix[[2, 6], [1, 3]]
m.rank # => 1
//} -
Matrix
# rank _ e -> Integer (307.0) -
階数 (rank) を返します。
階数 (rank) を返します。
このメソッドは deprecated です。
代わりに Matrix#rank を使ってください。 -
Matrix
:: LUPDecomposition # pivots -> [Integer] (307.0) -
ピボッティングを表す配列を返します。
ピボッティングを表す配列を返します。 -
Method
# arity -> Integer (307.0) -
メソッドが受け付ける引数の数を返します。
メソッドが受け付ける引数の数を返します。
ただし、メソッドが可変長引数を受け付ける場合、負の整数
-(必要とされる引数の数 + 1)
を返します。C 言語レベルで実装されたメソッドが可変長引数を
受け付ける場合、-1 を返します。
//emlist[例][ruby]{
class C
def u; end
def v(a); end
def w(*a); end
def x(a, b); end
def y(a, b, *c); end
def z(a, b, *... -
Method
# hash -> Integer (307.0) -
自身のハッシュ値を返します。
自身のハッシュ値を返します。
//emlist[例][ruby]{
a = method(:==)
b = method(:eql?)
p a.eql? b # => true
p a.hash == b.hash # => true
p [a, b].uniq.size # => 1
//} -
Method
# source _ location -> [String , Integer] | nil (307.0) -
ソースコードのファイル名と行番号を配列で返します。
ソースコードのファイル名と行番号を配列で返します。
その手続オブジェクトが ruby で定義されていない(つまりネイティブ
である)場合は nil を返します。
@see Proc#source_location
//emlist[例][ruby]{
# ------- /tmp/foo.rb ---------
class Foo
def foo; end
end
# ----- end of /tmp/foo.rb ----
require '/tmp/foo'
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m.source... -
Module
# <=>(other) -> Integer | nil (307.0) -
self と other の継承関係を比較します。
self と other の継承関係を比較します。
self と other を比較して、
self が other の子孫であるとき -1、
同一のクラス/モジュールのとき 0、
self が other の先祖であるとき 1
を返します。
継承関係にないクラス同士の比較では
nil を返します。
other がクラスやモジュールでなければ
nil を返します。
@param other 比較対象のクラスやモジュール
//emlist[例][ruby]{
module Foo
end
class Bar
include Foo
end
class Baz < Bar
end
... -
Module
# const _ source _ location(name , inherited = true) -> [String , Integer] (307.0) -
name で指定した定数の定義を含むソースコードのファイル名と行番号を配列で返します。
name で指定した定数の定義を含むソースコードのファイル名と行番号を配列で返します。
@param name Symbol,String で定数の名前を指定します。
@param inherited true を指定するとスーパークラスや include したモジュールで定義された定数が対象にはなります。false を指定した場合 対象にはなりません。
@return ソースコードのファイル名と行番号を配列で返します。
指定した定数が見つからない場合は nil を返します。
定数は見つかったがソースファイルが見つからなかった場合は空の配列を返します。
... -
Net
:: FTP # size(filename) -> Integer (307.0) -
リモートサーバ上のファイルのサイズを返します。
リモートサーバ上のファイルのサイズを返します。
@param filename サイズを調べたいファイル名を与えます。
@raise Net::FTPTempError 応答コードが 4yz のときに発生します。
@raise Net::FTPPermError 応答コードが 5yz のときに発生します。
@raise Net::FTPProtoError 応答コードが RFC 的に正しくない場合に発生します。
@raise Net::FTPReplyError 応答コードが上の場合以外で正しくない場合に発生します。 -
Net
:: FTP :: MLSxEntry # size -> Integer|nil (307.0) -
エントリのサイズを返します。
エントリのサイズを返します。
サイズ情報がない、もしくはサイズが意味をもたない(ディレクトリの場合など)
は nil を返します。 -
Net
:: HTTP # continue _ timeout -> Integer | nil (307.0) -
「100 Continue」レスポンスを待つ秒数を返します。
「100 Continue」レスポンスを待つ秒数を返します。
この秒数待ってもレスポンスが来ない場合は
リクエストボディを送信します。
デフォルトは nil (待たない)です。
@see Net::HTTP#continue_timeout= -
Net
:: HTTP # keep _ alive _ timeout -> Integer (307.0) -
以前のリクエストで使ったコネクションの再利用(keep-alive)を許可する秒数を 返します。
以前のリクエストで使ったコネクションの再利用(keep-alive)を許可する秒数を
返します。
デフォルトは2(秒)です。
@see Net::HTTP#keep_alive_timeout= -
Net
:: HTTP # local _ port -> nil | Integer | String (307.0) -
接続に用いるローカルポートを返します。
接続に用いるローカルポートを返します。
nil の場合システムが適当にローカルポートを
決めます。
デフォルトは nil です。
@see Net::HTTP#local_port=, Net::HTTP#local_host -
Net
:: HTTP # open _ timeout -> Integer|nil (307.0) -
接続時に待つ最大秒数を返します。
接続時に待つ最大秒数を返します。
この秒数たってもコネクションが
開かなければ例外 Net::OpenTimeout を発生します。
デフォルトは 60 (秒)です。
@see Net::HTTP#read_timeout, Net::HTTP#open_timeout= -
Net
:: HTTP # port -> Integer (307.0) -
接続するポート番号を返します。
接続するポート番号を返します。 -
Net
:: HTTP # read _ timeout -> Integer|nil (307.0) -
読みこみ(read(2)) 一回でブロックしてよい最大秒数 を返します。
読みこみ(read(2)) 一回でブロックしてよい最大秒数
を返します。
この秒数たっても読みこめなければ例外 Net::ReadTimeout
を発生します。
nilはタイムアウトしないことを意味します。
デフォルトは 60 (秒)です。
@see Net::HTTP#open_timeout, Net::HTTP#read_timeout= -
Net
:: HTTP # ssl _ timeout -> Integer | nil (307.0) -
SSL/TLS のタイムアウト秒数を返します。
SSL/TLS のタイムアウト秒数を返します。
設定されていない場合は nil を返します。
@see Net::HTTP#ssl_timeout=,
OpenSSL::SSL::SSLContext#ssl_timeout -
Net
:: HTTP # verify _ depth -> Integer (307.0) -
証明書チェイン上の検証する最大の深さを返します。
証明書チェイン上の検証する最大の深さを返します。
@see Net::HTTP#verify_depth=, OpenSSL::SSL::SSLContext#verify_depth -
Net
:: HTTP # verify _ mode -> Integer | nil (307.0) -
検証モードを返します。
検証モードを返します。
デフォルトは nil です。 -
Net
:: HTTPHeader # content _ length -> Integer|nil (307.0) -
Content-Length: ヘッダフィールドの表している値を整数で返します。
Content-Length: ヘッダフィールドの表している値を整数で返します。
ヘッダが設定されていない場合には nil を返します。
@raise Net::HTTPHeaderSyntaxError フィールドの値が不正である場合に
発生します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
re... -
Net
:: HTTPHeader # range _ length -> Integer|nil (307.0) -
Content-Range: ヘッダフィールドの表している長さを整数で返します。
Content-Range: ヘッダフィールドの表している長さを整数で返します。
ヘッダが設定されていない場合には nil を返します。
@raise Net::HTTPHeaderSyntaxError Content-Range: ヘッダフィールド
の値が不正である場合に
発生します。
//emlist[例][ruby]{
require 'net/http'
uri = UR... -
Net
:: IMAP # expunge -> [Integer] | nil (307.0) -
EXPUNGEコマンドを送り、:Deletedフラグをセットしたメッセージを すべて処理中のメールボックスから削除します。
EXPUNGEコマンドを送り、:Deletedフラグをセットしたメッセージを
すべて処理中のメールボックスから削除します。
削除したメッセージの message sequence number を配列で返します。
@raise Net::IMAP::NoResponseError メールボックスが read-only である場合に発生します -
Net
:: IMAP # search(keys , charset = nil) -> [Integer] (307.0) -
SEARCH コマンドを送り、条件に合うメッセージの message sequence number を配列で返します。
SEARCH コマンドを送り、条件に合うメッセージの message sequence number
を配列で返します。
Net::IMAP#examine もしくは Net::IMAP#select で
指定したメールボックスを検索対象とします。
検索の条件は key に文字列の1次元配列もしくは文字列で渡します。
検索条件は "SUBJECT", "FROM" などを用いることができます。
詳しくは 2060 の 6.4.4 を見てください。
例:
p imap.search(["SUBJECT", "hello"])
#=> [1, 6, 7, 8]
p imap.s... -
Net
:: IMAP # status(mailbox , attr) -> {String => Integer} (307.0) -
STATUS コマンドを送り、mailbox のステータスを得ます。
STATUS コマンドを送り、mailbox のステータスを得ます。
問い合わせたいステータスは attr に文字列の配列で渡します。
返り値は アトリビュート文字列をキーとするハッシュです。
詳しくは 2060 の 6.3.10 を参考にしてください。
例:
p imap.status("inbox", ["MESSAGES", "RECENT"])
#=> {"RECENT"=>0, "MESSAGES"=>44}
@param mailbox 問い合わせ対象のメールボックス(文字列)
@param attr 問合せたいアトリビュート名(文字列)の配列
@raise Ne... -
Net
:: IMAP # uid _ search(keys , charset = nil) -> [Integer] (307.0) -
UID SEARCH コマンドを送り、条件に合うメッセージの UID を配列で返します。
UID SEARCH コマンドを送り、条件に合うメッセージの UID
を配列で返します。
Net::IMAP#examine もしくは Net::IMAP#select で
指定したメールボックスを検索対象とします。
検索の条件は key に文字列の1次元配列もしくは文字列で渡します。
検索条件は "SUBJECT", "FROM" などを用いることができます。
詳しくは 2060 の 6.4.4 を見てください。
例:
p imap.uid_search(["SUBJECT", "hello"])
#=> [1, 6, 7, 8]
p imap.uid_search([... -
Net
:: IMAP :: BodyTypeBasic # size -> Integer (307.0) -
ボディのサイズのオクテット数を返します。
ボディのサイズのオクテット数を返します。 -
Net
:: IMAP :: BodyTypeMessage # lines -> Integer (307.0) -
ボディのテキストの行数を返します。
ボディのテキストの行数を返します。 -
Net
:: IMAP :: BodyTypeMessage # size -> Integer (307.0) -
ボディのサイズのオクテット数を返します。
ボディのサイズのオクテット数を返します。 -
Net
:: IMAP :: BodyTypeText # lines -> Integer (307.0) -
ボディの行数を返します。
ボディの行数を返します。 -
Net
:: IMAP :: BodyTypeText # size -> Integer (307.0) -
ボディのサイズのオクテット数を返します。
ボディのサイズのオクテット数を返します。 -
Net
:: IMAP :: FetchData # seqno -> Integer (307.0) -
メッセージの sequence number を返します。
メッセージの sequence number を返します。
Net::IMAP#uid_fetch、Net::IMAP#uid_storeであっても
UID ではなく、sequence numberを返します。 -
Net
:: IMAP :: MailboxQuota # quota -> Integer (307.0) -
メールボックスに指定されている上限値を返します。
メールボックスに指定されている上限値を返します。 -
Net
:: IMAP :: MailboxQuota # usage -> Integer (307.0) -
現在のメールボックス内の使用量を返します。
現在のメールボックス内の使用量を返します。 -
Net
:: IMAP :: StatusData # attr -> { String => Integer } (307.0) -
STATUS 応答の内容をハッシュで返します。
STATUS 応答の内容をハッシュで返します。
ハッシュのキーは
"MESSAGES", "RECENT", "UIDNEXT", "UIDVALIDITY", "UNSEEN"
などが使われます。
詳しくは 2060 の 6.3.10、7.2.4 を見てください。 -
Net
:: IMAP :: ThreadMember # seqno -> Integer | nil (307.0) -
メッセージの sequence number もしくは UID を返します。
メッセージの sequence number もしくは UID を返します。
root となるメッセージが存在しない場合しない木の場合は
nil を返します。 -
Net
:: POP3 # n _ bytes -> Integer (307.0) -
サーバにあるメールの総バイト数を返します。
サーバにあるメールの総バイト数を返します。
@see Net::POP3#n_mails
@raise TimeoutError 接続がタイムアウトした場合に発生します
@raise Net::POPError サーバがエラーを報告した場合に発生します
@raise Net::POPBadResponse サーバからの応答がプロトコル上不正であった場合に発生します -
Net
:: POP3 # n _ mails -> Integer (307.0) -
サーバにあるメールの数を返します。
サーバにあるメールの数を返します。
@see Net::POP3#n_bytes
@raise TimeoutError 接続がタイムアウトした場合に発生します
@raise Net::POPError サーバがエラーを報告した場合に発生します
@raise Net::POPBadResponse サーバからの応答がプロトコル上不正であった場合に発生します -
Net
:: POP3 # open _ timeout -> Integer (307.0) -
接続時に待つ最大秒数を返します。
接続時に待つ最大秒数を返します。
この秒数たってもコネクションが開かないときは例外 Net::OpenTimeout を発生します。
デフォルトは30秒です。
@see Net::POP3#open_timeout= -
Net
:: POP3 # port -> Integer (307.0) -
接続するポート番号です。
接続するポート番号です。 -
Net
:: POP3 # read _ timeout -> Integer (307.0) -
読み込みでブロックしてよい最大秒数を返します。
読み込みでブロックしてよい最大秒数を返します。
この秒数たっても読みこめなければ例外 ReadTimeout を発生します。
デフォルトは60秒です。
@see Net::POP3#read_timeout= -
Net
:: POPMail # number -> Integer (307.0) -
メールに対して振られた、そのメールボックスで一意な番号を返します。
メールに対して振られた、そのメールボックスで一意な番号を返します。
サーバに接続しなおすとこの番号は変化する場合があります。
メールごとに一意な識別子が必要なときは
Net::POPMail#uidl を使ってください。 -
Net
:: SMTP # open _ timeout -> Integer (307.0) -
接続時に待つ最大秒数を返します。
接続時に待つ最大秒数を返します。
デフォルトは30(秒)です。
この秒数たってもコネクションが
開かなければ例外 TimeoutError を発生します。
@see Net::SMTP#open_timeout= -
Net
:: SMTP # port -> Integer (307.0) -
接続先のポート番号を返します。
接続先のポート番号を返します。 -
Net
:: SMTP # read _ timeout -> Integer (307.0) -
読みこみ (read(2) 一回) でブロックしてよい最大秒数を返します。
読みこみ (read(2) 一回) でブロックしてよい最大秒数を返します。
デフォルトは60(秒)です。
この秒数たっても読みこめなければ例外 TimeoutError を発生します。
@see Net::SMTP#read_timeout= -
NilClass
# to _ i -> Integer (307.0) -
0 を返します。
0 を返します。
//emlist[例][ruby]{
nil.to_i #=> 0
//} -
Numeric
# ceil -> Integer (307.0) -
自身と等しいかより大きな整数のうち最小のものを返します。
自身と等しいかより大きな整数のうち最小のものを返します。
//emlist[例][ruby]{
1.ceil #=> 1
1.2.ceil #=> 2
(-1.2).ceil #=> -1
(-1.5).ceil #=> -1
//}
@see Numeric#floor, Numeric#round, Numeric#truncate -
Numeric
# div(other) -> Integer (307.0) -
self を other で割った整数の商 q を返します。
self を other で割った整数の商 q を返します。
ここで、商 q と余り r は、それぞれ
* self == other * q + r
と
* other > 0 のとき: 0 <= r < other
* other < 0 のとき: other < r <= 0
* q は整数
をみたす数です。
商に対応する余りは Numeric#modulo で求められます。
div はメソッド / を呼びだし、floorを取ることで計算されます。
メソッド / の定義はサブクラスごとの定義を用います。
@param other 自身を割る数を... -
Numeric
# round -> Integer (307.0) -
自身ともっとも近い整数を返します。
自身ともっとも近い整数を返します。
中央値 0.5, -0.5 はそれぞれ 1,-1 に切り上げされます。いわゆる四捨五入ですが、偶数丸めではありません。
//emlist[例][ruby]{
1.round #=> 1
1.2.round #=> 1
(-1.2).round #=> -1
(-1.5).round #=> -2
//}
@see Numeric#ceil, Numeric#floor, Numeric#truncate -
Numeric
# to _ int -> Integer (307.0) -
self.to_i と同じです。
self.to_i と同じです。
//emlist[例][ruby]{
(2+0i).to_int # => 2
Rational(3).to_int # => 3
//} -
Numeric
# truncate -> Integer (307.0) -
0 から 自身までの整数で、自身にもっとも近い整数を返します。
0 から 自身までの整数で、自身にもっとも近い整数を返します。
//emlist[例][ruby]{
1.truncate #=> 1
1.2.truncate #=> 1
(-1.2).truncate #=> -1
(-1.5).truncate #=> -1
//}
@see Numeric#ceil, Numeric#floor, Numeric#round -
Observable
# count _ observers -> Integer (307.0) -
登録されているオブザーバの数を返します。
登録されているオブザーバの数を返します。 -
OpenSSL
:: ASN1 :: ASN1Data # tag -> Integer (307.0) -
タグ番号を返します。
タグ番号を返します。
タグ番号です。Universal 型の場合は BOOLEAN = 1 から BMPSTRING = 30
のいずれかの値をとります。
@see OpenSSL::ASN1::ASN1Data#tag= -
OpenSSL
:: BN # num _ bits -> Integer (307.0) -
自身を表現するのに使っているビット数を返します。
自身を表現するのに使っているビット数を返します。
符号は無視されます。
//emlist[][ruby]{
require 'openssl'
OpenSSL::BN.new("127").num_bits # => 7
OpenSSL::BN.new("-127").num_bits # => 7
OpenSSL::BN.new("128").num_bits # => 8
//} -
OpenSSL
:: BN # num _ bytes -> Integer (307.0) -
自身を表現するのに使っているバイト数を返します。
自身を表現するのに使っているバイト数を返します。
//emlist[][ruby]{
require 'openssl'
p 0.to_bn.num_bytes # => 0
p 255.to_bn.num_bytes # => 1
p 256.to_bn.num_bytes # => 2
p 0b111_11111.to_bn.num_bytes # => 1
p 0b1000_00000.to_bn.num_bytes # => 2
//} -
OpenSSL
:: Buffering # write(str) -> Integer (307.0) -
str を出力します。
str を出力します。
書き込んだデータの長さを返します。
IO#write と同様です。
@param str 出力する文字列 -
OpenSSL
:: Buffering # write _ nonblock(s) -> Integer (307.0) -
文字列 s をノンブロッキングモードで書き込みます。
文字列 s をノンブロッキングモードで書き込みます。
成功した場合、書き込んだバイト数を返します。
1 バイトも書くことができず、ソケットの状態が変化するのを
待つ必要がある場合は例外を発生させます。
例外が発生した場合、内部のソケットが利用可能になってから
再びこのメソッドを呼んでください。
ただし内部バッファに書き込んでいないデータが残っている場合は、
まずバッファの内容をすべて出力してします。この時点で
ブロックする可能性があります。
基本的には IO#write_nonblock と同様です。しかし以下のような
違いもあります。
このメソッドはソケットが読み込み不可能(IO:... -
OpenSSL
:: Cipher # block _ size -> Integer (307.0) -
暗号化のブロックのサイズをバイト数で返します。
暗号化のブロックのサイズをバイト数で返します。 -
OpenSSL
:: Cipher # iv _ len -> Integer (307.0) -
必要な IV(Initialization Vector) の長さをバイト数で返します。
必要な IV(Initialization Vector) の長さをバイト数で返します。 -
OpenSSL
:: Cipher # key _ len -> Integer (307.0) -
暗号鍵の長さをバイト数で返します。
暗号鍵の長さをバイト数で返します。 -
OpenSSL
:: Digest # block _ length -> Integer (307.0) -
ハッシュ関数のブロックサイズを返します。
ハッシュ関数のブロックサイズを返します。 -
OpenSSL
:: Digest # digest _ length -> Integer (307.0) -
ハッシュ値の長さ(バイト数)を返します。
ハッシュ値の長さ(バイト数)を返します。 -
OpenSSL
:: OCSP :: BasicResponse # copy _ nonce(request) -> Integer (307.0) -
request から nonce の値をコピーします。
request から nonce の値をコピーします。
@param request コピー元のnonceを保持している Request (OpenSSL::OCSP::Request オブジェクト) -
OpenSSL
:: OCSP :: Request # check _ nonce(basic _ resp) -> Integer (307.0) -
自身の nonce とレスポンスの nonce が整合しているか チェックします。
自身の nonce とレスポンスの nonce が整合しているか
チェックします。
-1 から 3 までの整数を返します。それぞれの意味は以下の通りです。
* -1 自身にしか nonce が設定されていない
* 0 nonce が自身とレスポンスの両方にあるが等しくない
* 1 nonce が自身とレスポンスの両方にあり等しい
* 2 nonce が自身とレスポンスのどちらにもない
* 3 nonce がレスポンスにしか設定されていない
0 は明らかに不正なので、これは必ずチェックする必要があります。
1 は nonce が正しいということを意味します。
それ以外は、... -
OpenSSL
:: OCSP :: Response # status -> Integer (307.0) -
ステータスコードを整数で返します。
ステータスコードを整数で返します。
以下のいずれかを返します。
* OpenSSL::OCSP::RESPONSE_STATUS_SUCCESSFUL
* OpenSSL::OCSP::RESPONSE_STATUS_MALFORMEDREQUEST
* OpenSSL::OCSP::RESPONSE_STATUS_INTERNALERROR
* OpenSSL::OCSP::RESPONSE_STATUS_TRYLATER
* OpenSSL::OCSP::RESPONSE_STATUS_SIGREQUIRED
* OpenSSL::OCSP::RESPONSE_S... -
OpenSSL
:: PKCS7 :: RecipientInfo # serial -> Integer (307.0) -
送信先の証明書の識別番号を返します。
送信先の証明書の識別番号を返します。
これと OpenSSL::PKCS7::RecipientInfo#issuer で
送信先を一意に識別します。 -
OpenSSL
:: PKCS7 :: SignerInfo # serial -> Integer (307.0) -
署名者の証明書の識別番号を返します。
署名者の証明書の識別番号を返します。
これと OpenSSL::PKCS7::SignerInfo#issuer で
署名者を一意に識別します。 -
OpenSSL
:: PKey :: EC :: Group # asn1 _ flag -> Integer (307.0) -
自身に設定された ASN1 フラグを返します。
自身に設定された ASN1 フラグを返します。
@see OpenSSL::PKey::EC::Group#asn1_flag= -
OpenSSL
:: PKey :: EC :: Group # degree -> Integer (307.0) -
群の定義の元となっている体の要素を 表現するのに必要なビット数を返します。
群の定義の元となっている体の要素を
表現するのに必要なビット数を返します。