ライブラリ
- ビルトイン (213)
- bigdecimal (10)
-
bigdecimal
/ util (1) -
cgi
/ core (1) - csv (15)
- date (1)
- dbm (2)
- digest (4)
-
digest
/ sha2 (2) - drb (2)
- etc (1)
- fiddle (36)
-
fiddle
/ import (10) - gdbm (2)
- getoptlong (1)
-
io
/ console (2) - ipaddr (2)
-
irb
/ context (5) -
irb
/ ext / history (1) -
irb
/ ext / save-history (1) -
irb
/ output-method (2) - json (2)
- logger (4)
- matrix (12)
- mkmf (10)
-
net
/ ftp (3) -
net
/ http (13) -
net
/ imap (9) -
net
/ pop (4) - observer (1)
- openssl (56)
- optparse (12)
- pathname (6)
- pp (2)
- prettyprint (6)
- prime (5)
- psych (8)
- rake (1)
-
rdoc
/ stats (3) - resolv (10)
- resolv-replace (1)
- rexml (3)
-
rexml
/ document (8) -
rinda
/ rinda (1) -
rinda
/ tuplespace (1) - ripper (2)
-
ripper
/ filter (2) -
ripper
/ lexer (2) - rubygems (1)
-
rubygems
/ commands / dependency _ command (1) -
rubygems
/ config _ file (1) -
rubygems
/ package / tar _ writer (1) -
rubygems
/ source _ index (2) -
rubygems
/ user _ interaction (9) - sdbm (2)
- set (3)
- shell (12)
-
shell
/ command-processor (11) -
shell
/ filter (11) -
shell
/ process-controller (2) -
shell
/ system-command (1) - socket (24)
- stringio (17)
- strscan (6)
-
syslog
/ logger (1) - tempfile (2)
- uri (1)
-
webrick
/ httprequest (1) -
webrick
/ httpresponse (1) -
webrick
/ httpservlet / abstract (6) -
webrick
/ httpservlet / filehandler (1) -
webrick
/ log (1) - win32ole (17)
- zlib (20)
クラス
-
ARGF
. class (18) - Addrinfo (3)
- Array (39)
- BasicSocket (5)
- BigDecimal (10)
- CSV (9)
-
CSV
:: FieldInfo (2) -
CSV
:: Row (2) -
CSV
:: Table (2) - Complex (2)
- DBM (2)
-
DRb
:: DRbObject (1) -
DRb
:: DRbServer (1) - Date (1)
-
Digest
:: Base (4) -
Digest
:: SHA2 (2) - Dir (2)
- Enumerator (1)
-
Fiddle
:: CStruct (2) -
Fiddle
:: Closure (3) -
Fiddle
:: Function (4) -
Fiddle
:: Handle (4) -
Fiddle
:: Pointer (25) - File (1)
-
File
:: Stat (17) - Float (9)
- GDBM (2)
-
Gem
:: Commands :: DependencyCommand (1) -
Gem
:: ConfigFile (1) -
Gem
:: Package :: TarWriter :: BoundedStream (1) -
Gem
:: SourceIndex (2) -
Gem
:: StreamUI :: SimpleProgressReporter (1) - GetoptLong (1)
- Hash (2)
- IO (16)
- IPAddr (2)
-
IRB
:: Context (7) -
IRB
:: OutputMethod (1) -
IRB
:: StdioOutputMethod (1) - Integer (31)
-
JSON
:: State (1) - Logger (3)
-
Logger
:: LogDevice (1) - MatchData (6)
- Matrix (11)
-
Matrix
:: LUPDecomposition (1) - Method (1)
- Module (1)
-
Net
:: FTP (1) -
Net
:: FTP :: MLSxEntry (2) -
Net
:: HTTP (9) -
Net
:: IMAP (4) -
Net
:: IMAP :: BodyTypeMessage (1) -
Net
:: IMAP :: BodyTypeText (1) -
Net
:: IMAP :: MailboxQuota (2) -
Net
:: IMAP :: ThreadMember (1) -
Net
:: POP3 (1) -
Net
:: POPMail (3) - NilClass (1)
- Numeric (3)
- Object (2)
-
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 :: EC :: Group (5) -
OpenSSL
:: PKey :: EC :: Point (5) -
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) - OptionParser (12)
- Pathname (6)
- PrettyPrint (6)
- Prime (1)
-
Prime
:: PseudoPrimeGenerator (1) -
Prime
:: TrialDivisionGenerator (2) - Proc (1)
-
Process
:: Status (3) -
Psych
:: Emitter (1) -
Psych
:: Nodes :: Mapping (1) -
Psych
:: Nodes :: Scalar (1) -
Psych
:: Nodes :: Sequence (1) -
Psych
:: Parser :: Mark (2) -
Psych
:: SyntaxError (2) -
RDoc
:: Options (1) -
RDoc
:: Stats (3) -
REXML
:: Attributes (2) -
REXML
:: Elements (2) -
REXML
:: Formatters :: Pretty (1) -
REXML
:: Parent (3) -
REXML
:: ParseException (3) - Random (4)
- Range (3)
- Rational (8)
- Regexp (2)
-
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 (11) -
Shell
:: Filter (11) -
Shell
:: ProcessController (2) -
Shell
:: SystemCommand (1) - SignalException (1)
-
Socket
:: AncillaryData (7) -
Socket
:: Ifaddr (2) -
Socket
:: Option (3) - String (11)
- StringIO (17)
- StringScanner (6)
- Struct (2)
- Symbol (5)
-
Syslog
:: Logger (1) - SystemCallError (1)
- Tempfile (2)
- Thread (2)
-
Thread
:: Backtrace :: Location (1) -
Thread
:: Mutex (1) -
Thread
:: Queue (2) -
Thread
:: SizedQueue (2) - Time (1)
- TracePoint (12)
- UDPSocket (4)
- UNIXSocket (1)
-
URI
:: Generic (1) - UnboundMethod (1)
-
WEBrick
:: BasicLog (1) -
WEBrick
:: HTTPRequest (1) -
WEBrick
:: HTTPResponse (1) -
WEBrick
:: HTTPServlet :: AbstractServlet (6) -
WEBrick
:: HTTPServlet :: DefaultFileHandler (1) - WIN32OLE (1)
-
WIN32OLE
_ METHOD (8) -
WIN32OLE
_ TYPE (4) -
WIN32OLE
_ TYPELIB (2) -
WIN32OLE
_ VARIABLE (1) -
WIN32OLE
_ VARIANT (1) -
Zlib
:: GzipFile (3) -
Zlib
:: GzipReader (5) -
Zlib
:: GzipWriter (6) -
Zlib
:: ZStream (6)
モジュール
-
CGI
:: QueryExtension (1) - Enumerable (5)
-
Fiddle
:: Importer (8) -
Gem
:: DefaultUserInteraction (3) -
Gem
:: QuickLoader (1) -
Gem
:: UserInteraction (5) -
JSON
:: Generator :: GeneratorMethods :: Integer (1) - Kernel (10)
-
Net
:: HTTPHeader (4) - Observable (1)
-
OpenSSL
:: Buffering (4) -
OpenSSL
:: SSL :: SocketForwarder (1) -
Rake
:: TaskManager (1)
キーワード
- + (1)
- +@ (1)
- - (1)
- -@ (1)
- < (1)
- << (1)
- <= (1)
- <=> (5)
- == (3)
- === (1)
- =~ (3)
- > (1)
- >= (1)
- [] (9)
- []= (5)
-
_ _ drbref (1) - abi (1)
- adler (1)
- afamily (1)
- alert (1)
-
alert
_ error (1) -
alert
_ warning (1) - allbits? (1)
- anybits? (1)
- args (1)
-
ask
_ yes _ no (1) -
asn1
_ flag (1) - at (1)
-
avail
_ in (1) -
avail
_ out (1) -
back
_ trace _ limit (1) - begin (1)
- bind (1)
- binwrite (1)
-
bit
_ length (1) - blksize (1)
-
block
_ length (3) -
block
_ size (1) - blocks (1)
- breakable (2)
-
bsearch
_ index (1) -
buffer
_ initial _ length (1) -
bulk
_ threshold (1) -
calculate
_ integers _ for _ gem _ version (1) - call (1)
-
callee
_ id (1) - ceil (5)
-
check
_ nonce (1) -
check
_ point (2) -
check
_ signedness (2) -
check
_ sizeof (2) - chmod (3)
-
choose
_ from _ list (1) - chown (3)
- cipher (1)
- ciphers (1)
- close (1)
- codepoints (4)
- cofactor (1)
-
cofactor
_ expansion (1) - column (4)
-
column
_ count (1) -
column
_ size (1) - combination (1)
-
content
_ length (4) - context (1)
-
continue
_ timeout (1) -
convertible
_ int (2) -
copy
_ nonce (1) - count (4)
-
count
_ observers (1) -
coverage
_ report (1) - crc (1)
-
create
_ value (1) - ctype (1)
- cycle (2)
-
data
_ type (1) - debug (1)
- debug? (1)
-
debug
_ level (1) -
default
_ port (1) -
defined
_ class (1) - degree (1)
- delete (4)
-
delete
_ at (1) - denominator (3)
-
dev
_ major (1) -
dev
_ minor (1) -
digest
_ length (3) - disable (2)
- dispid (1)
-
do
_ DELETE (1) -
do
_ GET (1) -
do
_ HEAD (1) -
do
_ OPTIONS (1) -
do
_ POST (1) -
do
_ PUT (1) - downto (1)
-
each
_ codepoint (4) - enable (2)
- enabled? (1)
- end (1)
- eql? (2)
- errno (1)
- error (2)
-
error
_ depth (1) -
eval
_ history (1) - even? (1)
- event (1)
-
event
_ interface (1) - exist? (1)
- exitstatus (1)
- expire (1)
- exponent (1)
- expunge (1)
- extern (1)
- facts (1)
- family (3)
- fcntl (3)
-
field
_ size _ limit (1) - fileno (4)
-
find
_ index (6) -
finish
_ all _ jobs (2) - first (1)
-
first
_ lineno (1) - flags (1)
- flatten (1)
- flatten! (1)
- floor (5)
- flush (1)
- free (1)
- free= (1)
- gcdlcm (1)
- generator (1)
- getbyte (4)
- getc (1)
- gid (1)
- group (2)
- hash (3)
-
hash
_ old (1) - helpcontext (2)
-
ignore
_ sigint (1) -
ignore
_ sigint= (1) -
ignore
_ sigint? (1) -
import
_ symbol (1) - index (8)
- ino (1)
- insert (1)
- integer? (1)
- intern (3)
-
internal
_ encoding (4) - intersect? (1)
- invert! (1)
- invkind (1)
- ioctl (2)
-
ip
_ pktinfo (1) -
ipv6
_ pktinfo (1) -
ipv6
_ pktinfo _ ifindex (1) -
iv
_ len (1) -
keep
_ alive _ timeout (1) -
key
_ len (1) - kill (2)
-
kill
_ job (1) -
laplace
_ expansion (1) - last (4)
- lchmod (1)
- lchown (1)
- lcm (1)
- ld (1)
- left (1)
- length (22)
- level (6)
- lex (1)
- limit (1)
- line (4)
-
line
_ width (1) - lineno (9)
- lines (2)
- linger (1)
-
local
_ port (1) -
major
_ version (2) - match? (1)
-
matched
_ size (1) - matchedsize (1)
-
method
_ id (1) - minimum (1)
-
minor
_ version (2) - mode (1)
- modulo (1)
-
n
_ mails (1) - newline (1)
- next (1)
- nlink (1)
- nobits? (1)
- null? (1)
-
num
_ bits (1) -
num
_ bytes (1) -
num
_ classes (1) -
num
_ files (1) -
num
_ modules (1) - number (1)
- numerator (2)
- odd? (1)
- offset (2)
-
offset
_ vtbl (1) -
ole
_ query _ interface (1) -
on
_ curve? (1) -
open
_ timeout (1) - order (4)
- order! (2)
- ordering (1)
-
os
_ code (1) - pack (2)
- parse (3)
- parse! (1)
- pathconf (1)
- pending (1)
-
pending
_ interrupt? (1) - permutation (2)
- permute (2)
- permute! (1)
- pfamily (1)
- pid (2)
- pivots (1)
-
point
_ conversion _ form (1) -
point
_ conversion _ form= (1) - pop (1)
- port (1)
- pos (3)
- position (1)
- pow (1)
- precs (1)
- preference (1)
-
prepare
_ range (1) -
pretty
_ print (1) -
pretty
_ print _ cycle (1) -
pretty
_ print _ instance _ variables (1) - prime? (1)
-
prime
_ division (1) - print (7)
-
print
_ dependencies (1) - printf (5)
- printn (1)
- priority (1)
- protocol (2)
-
proxy
_ port (1) - proxyport (1)
- ptr (2)
- putc (1)
- quota (1)
- rand (3)
-
range
_ length (1) - rationalize (2)
- raw (1)
- raw! (1)
- rdev (1)
-
rdev
_ major (1) -
rdev
_ minor (1) -
read
_ timeout (1) - readbyte (1)
- readchar (1)
-
recv
_ io (1) - recvmsg (1)
-
recvmsg
_ nonblock (1) - ref (1)
- refresh (1)
- renew (1)
-
repeated
_ combination (1) -
repeated
_ permutation (1) - retry (1)
-
return
_ value (1) -
return
_ vtype (1) - rindex (3)
- rm (3)
- rotate! (1)
- round (5)
-
safe
_ level (2) - sample (4)
-
save
_ history (1) - search (1)
- self (1)
- send (5)
- sendmsg (1)
-
sendmsg
_ nonblock (1) - seqno (1)
- serial (4)
-
session
_ cache _ mode (1) -
session
_ cache _ size (1) -
session
_ cache _ stats (1) -
set
_ encoding (7) -
sev
_ threshold (1) - sfork (1)
- shift (1)
- signo (1)
- size (34)
- size= (1)
- size? (4)
-
size
_ opt _ params (1) -
size
_ params (1) - sizeof (1)
- skip (1)
-
skip
_ until (1) - sleep (1)
-
source
_ location (3) - split (1)
-
ssl
_ timeout (2) - status (3)
- stopsig (1)
- struct (1)
- style (3)
- subsec (1)
- succ (1)
- sym (1)
- syswrite (1)
- tag (1)
- tell (7)
- termsig (1)
- test (3)
- text (1)
- timeout (2)
- times (1)
-
to
_ a (1) -
to
_ bn (1) -
to
_ d (1) -
to
_ f (1) -
to
_ i (15) -
to
_ int (4) -
to
_ json (1) -
to
_ ptr (1) -
to
_ r (1) -
to
_ s (2) -
to
_ str (2) -
to
_ sym (2) -
to
_ value (1) -
total
_ in (1) -
total
_ out (1) - tr (1)
- trace (1)
- truncate (4)
-
try
_ constant (2) -
try
_ link (2) - type (1)
- typekind (1)
- ui (1)
- ui= (1)
- uid (1)
-
uid
_ search (1) - ungetc (1)
- union (1)
- unlink (1)
- unpack (1)
-
upper
_ bound (1) - usage (1)
-
use
_ ui (1) - utime (3)
- value (1)
- varkind (1)
- vartype (1)
-
verify
_ depth (1) -
verify
_ mode (2) -
verify
_ result (1) - version (3)
- vhid (1)
- weight (1)
- width (1)
-
world
_ readable? (1) -
world
_ writable? (1) - write (5)
-
write
_ nonblock (3) - ~ (1)
検索結果
先頭5件
-
Socket
:: AncillaryData # int -> Integer (72979.0) -
自身が保持している cmsg data (データ) を整数の形で返します。
自身が保持している cmsg data (データ) を整数の形で返します。
整数データのサイズおよびエンディアンは実行するホストによって異なります。
require 'socket'
ancdata = Socket::AncillaryData.int(:UNIX, :SOCKET, :RIGHTS, STDERR.fileno)
p ancdata.int #=> 2
@raise TypeError cmgs data のサイズが int のバイト数と異なる場合に発生します
@see Socket::AncillaryData.new Socket::Ancillar... -
Gem
:: QuickLoader # calculate _ integers _ for _ gem _ version (64204.0) -
prelude.c で定義されている内部用のメソッドです。
prelude.c で定義されている内部用のメソッドです。 -
WIN32OLE
# ole _ query _ interface(iid) -> WIN32OLE (64204.0) -
IID(インターフェイスID)を指定してオブジェクトの別のインターフェイスを 持つオブジェクトを取得します。
IID(インターフェイスID)を指定してオブジェクトの別のインターフェイスを
持つオブジェクトを取得します。
オブジェクトが複数のオートメーション用インターフェイスを持つ場合に、当
メソッドを利用して既定のインターフェイスとは異なるインターフェイスを取
得します。
@param iid 取得するインターフェイスのIIDを文字列で指定します。
@return iidパラメータで指定したインターフェイスを持つWIN32OLEオブジェクト
@raise WIN32OLERuntimeError 指定したIIDをオブジェクトが持たない場合に通知されます。
ie = WIN32OLE.n... -
Resolv
:: DNS :: Resource :: MX # preference -> Integer (63904.0) -
このMXレコードの優先度を返します。
このMXレコードの優先度を返します。 -
Resolv
:: DNS :: Resource :: SOA # refresh -> Integer (63904.0) -
プライマリサーバからの更新をセカンダリサーバがチェックする 頻度を秒単位で返します。
プライマリサーバからの更新をセカンダリサーバがチェックする
頻度を秒単位で返します。 -
WEBrick
:: HTTPServlet :: DefaultFileHandler # prepare _ range(range , filesize) -> [Integer , Integer] (55504.0) -
WEBrick::HTTPServlet::DefaultFileHandler#make_partial_content で利用する範囲情報を生成して返します。
WEBrick::HTTPServlet::DefaultFileHandler#make_partial_content で利用する範囲情報を生成して返します。
@param range 2 要素の配列を指定します。
@param filesize ファイルサイズを指定します。 -
Kernel
# convertible _ int(type , headers = nil , opts = nil) (54958.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) { . . . } (54958.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... -
ARGF
. class # internal _ encoding -> Encoding | nil (54904.0) -
ARGF から読み込んだ文字列の内部エンコーディングを返します。 内部エンコーディングが指定されていない場合は nil を返します。
ARGF から読み込んだ文字列の内部エンコーディングを返します。
内部エンコーディングが指定されていない場合は nil を返します。
まだ読み込み処理を始めていない場合は Encoding.default_external を返します。
ARGF.class#set_encoding で設定します。
例:
# $ ruby -Eutf-8 test.rb
# test.rb
ARGF.internal_encoding # => #<Encoding:UTF-8>
ARGF.set_encoding('utf-8','ascii')
ARG... -
CSV
# internal _ encoding -> Encoding | nil (54904.0) -
IO#internal_encoding に委譲します。
IO#internal_encoding に委譲します。
@see IO#internal_encoding -
IO
# internal _ encoding -> Encoding | nil (54904.0) -
IO の内部エンコーディングを返します。 内部エンコーディングが指定されていない場合は nil を返します。
IO の内部エンコーディングを返します。
内部エンコーディングが指定されていない場合は nil を返します。
//emlist[例][ruby]{
IO.write("testfile", "abcde")
File.open("testfile") do |f|
p f.internal_encoding # => nil
f.set_encoding("ASCII-8BIT", "EUC-JP")
p f.internal_encoding # => #<Encoding:EUC-JP>
end
//} -
Object
# pretty _ print _ cycle(pp) -> () (54904.0) -
プリティプリント時にオブジェクトの循環参照が検出された場合、 Object#pretty_print の代わりに呼ばれるメソッドです。
プリティプリント時にオブジェクトの循環参照が検出された場合、
Object#pretty_print の代わりに呼ばれるメソッドです。
あるクラスの pp の出力をカスタマイズしたい場合は、
このメソッドも再定義する必要があります。
@param pp PP オブジェクトです。
//emlist[][ruby]{
class Array
def pretty_print_cycle(q)
q.text(empty? ? '[]' : '[...]')
end
end
//}
@see Object#pretty_print -
Object
# pretty _ print _ instance _ variables -> [String | Symbol] (54904.0) -
プリティプリント時に表示すべき自身のインスタンス変数名の配列をソートして返します。 返されたインスタンス変数はプリティプリント時に表示されます。
プリティプリント時に表示すべき自身のインスタンス変数名の配列をソートして返します。
返されたインスタンス変数はプリティプリント時に表示されます。
pp に表示したくないインスタンス変数がある場合にこのメソッドを再定義します。 -
OpenSSL
:: Buffering # print(*args) -> nil (54904.0) -
args を順に出力します。
args を順に出力します。
args の各要素を to_s で文字列に変換して
出力します。
IO#print とほぼ同様ですが、引数を省略した場合に $_ を出力する
機能はありません。
@param args 出力するオブジェクト -
OpenSSL
:: Buffering # printf(format , *args) -> nil (54904.0) -
format に従い引数 args を文字列に変換して 出力します。
format に従い引数 args を文字列に変換して
出力します。
IO#printf と同様です。
@param format 出力フォーマット文字列
@param arg 出力するオブジェクト
@see Kernel.#printf -
PrettyPrint
# breakable(sep , width = sep . length) -> () (54904.0) -
「必要ならここで改行出来る」ということを自身に通知します。 もしその位置で改行されなければ、width カラムのテキスト sep が出力の際にそこに挿入されます。
「必要ならここで改行出来る」ということを自身に通知します。
もしその位置で改行されなければ、width カラムのテキスト sep が出力の際にそこに挿入されます。
@param sep 改行が起きなかった場合に挿入されるテキストを文字列で指定します。
@param width テキスト sep は width カラムであると仮定されます。指定されなければ、
sep.length が利用されます。例えば sep が多バイト文字の際に指定する必要があるかも知れません。 -
Shell
:: ProcessController # kill _ job(signal , command) -> Integer (54904.0) -
指定されたコマンドにシグナルを送ります。
指定されたコマンドにシグナルを送ります。
@param signal シグナルを整数かその名前の文字列で指定します。
負の値を持つシグナル(あるいはシグナル名の前に-)を指定すると、
プロセスではなくプロセスグループにシグナルを送ります。
@param command コマンドを指定します。
@see Process.#kill -
StringIO
# internal _ encoding -> Encoding (54904.0) -
現在の内部エンコーディングを返します。
現在の内部エンコーディングを返します。 -
Zlib
:: GzipWriter # print(*str) -> nil (54904.0) -
引数を自身に順に出力します。引数を省略した場合は、$_ を出力します。
引数を自身に順に出力します。引数を省略した場合は、$_ を出力します。
@param str 出力するオブジェクトを指定します。
require 'zlib'
filename='hoge1.gz'
fw = File.open(filename, "w")
Zlib::GzipWriter.wrap(fw, Zlib::BEST_COMPRESSION){|gz|
gz.print "ugo"
}
fr = File.open(filename)
Zlib::GzipReader.wrap(fr){|gz|
puts gz.read
}... -
Zlib
:: GzipWriter # printf(format , *args) -> nil (54904.0) -
C 言語の printf と同じように、format に従い引数 を文字列に変換して、自身に出力します。
C 言語の printf と同じように、format に従い引数
を文字列に変換して、自身に出力します。
@param format フォーマット文字列を指定します。print_format を参照してください。
@param args フォーマットされるオブジェクトを指定します。
require 'zlib'
filename='hoge1.gz'
fw = File.open(filename, "w")
Zlib::GzipWriter.wrap(fw, Zlib::BEST_COMPRESSION){|gz|
gz.printf("\n%9s", "b... -
PrettyPrint
# breakable(sep = & # 39; & # 39;) -> () (54604.0) -
「必要ならここで改行出来る」ということを自身に通知します。 もしその位置で改行されなければ、width カラムのテキスト sep が出力の際にそこに挿入されます。
「必要ならここで改行出来る」ということを自身に通知します。
もしその位置で改行されなければ、width カラムのテキスト sep が出力の際にそこに挿入されます。
@param sep 改行が起きなかった場合に挿入されるテキストを文字列で指定します。
@param width テキスト sep は width カラムであると仮定されます。指定されなければ、
sep.length が利用されます。例えば sep が多バイト文字の際に指定する必要があるかも知れません。 -
Float
# floor(ndigits = 0) -> Integer | Float (46204.0) -
自身と等しいかより小さな整数のうち最大のものを返します。
自身と等しいかより小さな整数のうち最大のものを返します。
@param ndigits 10進数での小数点以下の有効桁数を整数で指定します。
正の整数を指定した場合、Float を返します。
小数点以下を、最大 n 桁にします。
負の整数を指定した場合、Integer を返します。
小数点位置から左に少なくとも n 個の 0 が並びます。
//emlist[例][ruby]{
1.2.floor # => 1
2.0.floor # => 2
(-1... -
StringIO
# print() -> nil (45922.0) -
自身に引数を順に出力します。引数を省略した場合は、$_ を出力します。 引数の扱いは Kernel.#print を参照して下さい。
自身に引数を順に出力します。引数を省略した場合は、$_ を出力します。
引数の扱いは Kernel.#print を参照して下さい。
@param obj 書き込みたいオブジェクトを指定します。
@raise IOError 自身が書き込み用にオープンされていなければ発生します。
//emlist[例][ruby]{
require "stringio"
a = StringIO.new("", 'r+')
a.print("hoge", "bar", "foo")
a.string #=> "hogebarfoo"
//} -
StringIO
# print(*obj) -> nil (45922.0) -
自身に引数を順に出力します。引数を省略した場合は、$_ を出力します。 引数の扱いは Kernel.#print を参照して下さい。
自身に引数を順に出力します。引数を省略した場合は、$_ を出力します。
引数の扱いは Kernel.#print を参照して下さい。
@param obj 書き込みたいオブジェクトを指定します。
@raise IOError 自身が書き込み用にオープンされていなければ発生します。
//emlist[例][ruby]{
require "stringio"
a = StringIO.new("", 'r+')
a.print("hoge", "bar", "foo")
a.string #=> "hogebarfoo"
//} -
StringIO
# printf(format , *obj) -> nil (45922.0) -
指定されたフォーマットに従い各引数 obj を文字列に変換して、自身に出力します。
指定されたフォーマットに従い各引数 obj を文字列に変換して、自身に出力します。
@param format 文字列のフォーマットを指定します。Kernel.#format を参照して下さい。
@param obj 書き込みたいオブジェクトを指定します。
@raise IOError 自身が書き込み用にオープンされていなければ発生します。
//emlist[例][ruby]{
require "stringio"
a = StringIO.new("", 'r+')
a.printf("%c%c%c", 97, 98, 99)
a.string ... -
WEBrick
:: HTTPServlet :: AbstractServlet # do _ DELETE(request , response) -> () (45922.0) -
自身の service メソッドから HTTP のリクエストに応じて 呼ばれるメソッドです。AbstractServlet のサブクラスはこれらのメソッドを適切に実装し なければいけません。返り値は特に規定されていません。
自身の service メソッドから HTTP のリクエストに応じて
呼ばれるメソッドです。AbstractServlet のサブクラスはこれらのメソッドを適切に実装し
なければいけません。返り値は特に規定されていません。
クライアントが使う可能性のある RFC で定義された HTTP のメソッドはすべて実装する必要があります。
クライアントからのリクエストに使われないと分かっているメソッドは実装しなくてもかまいません。
実装されていない HTTP メソッドであった場合、自身の service メソッドが
例外を発生させます。
このメソッドが呼ばれた時点では、クライアントからのリクエスト... -
ARGF
. class # print(*arg) -> nil (45904.0) -
引数を順に処理対象のファイルに出力します。
引数を順に処理対象のファイルに出力します。
c:ARGF#inplace時にのみ使用できます。
また $stdout への代入の影響を受けません。
それ以外は Kernel.#print と同じです。
@param arg 出力するオブジェクトを任意個指定します。 -
ARGF
. class # printf(format , *arg) -> nil (45904.0) -
C 言語の printf と同じように、format に従い引数を 文字列に変換して処理対象のファイルに出力します。
C 言語の printf と同じように、format に従い引数を
文字列に変換して処理対象のファイルに出力します。
c:ARGF#inplace時にのみ使用できます。
また $stdout への代入の影響を受けません。
それ以外は出力先を指定しない形式の Kernel.#printf と同じです。
@param format フォーマット文字列です。
@param arg フォーマットされる引数です。 -
Fiddle
:: Importer # import _ symbol(name) -> Fiddle :: Pointer (45904.0) -
取り込んだライブラリからシンボルをインポートします。
取り込んだライブラリからシンボルをインポートします。
返り値はシンボルがロードされたメモリのアドレスを持つ Fiddle::Pointer
オブジェクトを返します。
@param name シンボル名(文字列) -
File
:: Stat # world _ readable? -> Integer | nil (45904.0) -
全てのユーザから読めるならば、そのファイルのパーミッションを表す 整数を返します。そうでない場合は nil を返します。
全てのユーザから読めるならば、そのファイルのパーミッションを表す
整数を返します。そうでない場合は nil を返します。
整数の意味はプラットフォームに依存します。
//emlist[][ruby]{
m = File.stat("/etc/passwd").world_readable? # => 420
sprintf("%o", m) # => "644"
//} -
File
:: Stat # world _ writable? -> Integer | nil (45904.0) -
全てのユーザから書き込めるならば、そのファイルのパーミッションを表す 整数を返します。そうでない場合は nil を返します。
全てのユーザから書き込めるならば、そのファイルのパーミッションを表す
整数を返します。そうでない場合は nil を返します。
整数の意味はプラットフォームに依存します。
//emlist[][ruby]{
m = File.stat("/tmp").world_writable? # => 511
sprintf("%o", m) # => "777"
//} -
Integer
# floor(ndigits = 0) -> Integer (45904.0) -
self と等しいかより小さな整数のうち最大のものを返します。
self と等しいかより小さな整数のうち最大のものを返します。
@param ndigits 10進数での小数点以下の有効桁数を整数で指定します。
負の整数を指定した場合、小数点位置から左に少なくとも n 個の 0 が並びます。
//emlist[][ruby]{
1.floor # => 1
1.floor(2) # => 1
18.floor(-1) # => 10
(-18).floor(-1) # => -20
//}
@see Numeric#floor -
Integer
# rationalize -> Rational (45904.0) -
自身を Rational に変換します。
自身を Rational に変換します。
@param eps 許容する誤差
引数 eps は常に無視されます。
//emlist[][ruby]{
2.rationalize # => (2/1)
2.rationalize(100) # => (2/1)
2.rationalize(0.1) # => (2/1)
//} -
Integer
# rationalize(eps) -> Rational (45904.0) -
自身を Rational に変換します。
自身を Rational に変換します。
@param eps 許容する誤差
引数 eps は常に無視されます。
//emlist[][ruby]{
2.rationalize # => (2/1)
2.rationalize(100) # => (2/1)
2.rationalize(0.1) # => (2/1)
//} -
OpenSSL
:: Buffering # write _ nonblock(s) -> Integer (45904.0) -
文字列 s をノンブロッキングモードで書き込みます。
文字列 s をノンブロッキングモードで書き込みます。
成功した場合、書き込んだバイト数を返します。
1 バイトも書くことができず、ソケットの状態が変化するのを
待つ必要がある場合は例外を発生させます。
例外が発生した場合、内部のソケットが利用可能になってから
再びこのメソッドを呼んでください。
ただし内部バッファに書き込んでいないデータが残っている場合は、
まずバッファの内容をすべて出力してします。この時点で
ブロックする可能性があります。
基本的には IO#write_nonblock と同様です。しかし以下のような
違いもあります。
このメソッドはソケットが読み込み不可能(IO:... -
OpenSSL
:: PKCS7 :: SignerInfo # serial -> Integer (45904.0) -
署名者の証明書の識別番号を返します。
署名者の証明書の識別番号を返します。
これと OpenSSL::PKCS7::SignerInfo#issuer で
署名者を一意に識別します。 -
OpenSSL
:: PKey :: EC :: Group # point _ conversion _ form -> Symbol (45904.0) -
点のエンコーディング方式を返します。
点のエンコーディング方式を返します。
以下のいずれかを返します。
* :compressed
* :uncompressed
* :hybrid
詳しくは X9.62 (ECDSA) などを参照してください。
@raise OpenSSL::PKey::EC::Group::Error 得られたエンコーディングが未知の値であった
場合に発生します。
@see OpenSSL::PKey::EC::Group#point_conversion_form= -
OpenSSL
:: SSL :: SSLSocket # verify _ result -> Integer (45904.0) -
検証結果のエラーコードを整数値で返します。
検証結果のエラーコードを整数値で返します。
エラーコードの整数値は OpenSSL::X509 に定数が定義されています。
詳しくは c:OpenSSL::X509#verify_error を見てください。
検証に成功した場合は OpenSSL::X509::V_OK を返します。 -
Resolv
:: DNS :: Resource :: IN :: SRV # priority -> Integer (45904.0) -
ホストの優先順位を返します。
ホストの優先順位を返します。
クライアントは利用可能なホストの中で最も priority が
小さい数値のホストを利用しなければなりません。
priority が同じならば Resolv::DNS::Resource::IN::SRV#weight
で定義されるようにホストを選ぶべきです。
返り値の範囲は 0 から 65535 までの整数値です。 -
Resolv
:: DNS :: Resource :: IN :: WKS # protocol -> Integer (45904.0) -
IPプロトコル番号を返します。
IPプロトコル番号を返します。
例えば 6 は TCP に対応します。 -
Resolv
:: DNS :: Resource :: SOA # serial -> Integer (45904.0) -
ゾーンファイルのバージョンを返します。
ゾーンファイルのバージョンを返します。 -
RubyVM
:: InstructionSequence # first _ lineno -> Integer (45904.0) -
self が表す命令シーケンスの 1 行目の行番号を返します。
self が表す命令シーケンスの 1 行目の行番号を返します。
例1:irb で実行した場合
RubyVM::InstructionSequence.compile('num = 1 + 2').first_lineno
# => 1
例2:
# /tmp/method.rb
require "foo-library"
def foo
p :foo
end
RubyVM::InstructionSequence.of(method(:foo)).first_lineno
# => 2 -
Symbol
# intern -> self (45904.0) -
self を返します。
self を返します。
例:
:foo.intern # => :foo
@see String#intern -
URI
:: Generic # default _ port -> Integer | nil (45904.0) -
self.class.default_port を返します。
self.class.default_port を返します。
@see URI::Generic.default_port -
WIN32OLE
_ METHOD # event _ interface -> String | nil (45904.0) -
メソッドがイベントの場合、イベントのインターフェイス名を取得します。
メソッドがイベントの場合、イベントのインターフェイス名を取得します。
@return メソッドがイベントであれば、イベントのインターフェイス名を返し
ます。イベントでなければnilを返します。
tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Workbook')
method = WIN32OLE_METHOD.new(tobj, 'SheetActivate')
puts method.event_interface # => WorkbookEvents -
Gem
:: UserInteraction # alert(*args) -> () (45604.0) -
INFO レベルのアラートを出力します。
INFO レベルのアラートを出力します。
@param args 委譲先のメソッドに与える引数です。 -
Gem
:: UserInteraction # alert _ error(*args) -> () (45604.0) -
ERROR レベルのアラートを出力します。
ERROR レベルのアラートを出力します。
@param args 委譲先のメソッドに与える引数です。 -
Gem
:: UserInteraction # alert _ warning(*args) -> () (45604.0) -
WARNING レベルのアラートを出力します。
WARNING レベルのアラートを出力します。
@param args 委譲先のメソッドに与える引数です。 -
Gem
:: UserInteraction # choose _ from _ list(*args) -> Array (45604.0) -
リストから回答を選択する質問をします。
リストから回答を選択する質問をします。
@param args 委譲先のメソッドに与える引数です。
@return 選択肢の名称と選択肢のインデックスを要素とする配列を返します。 -
OpenSSL
:: BN # pretty _ print(pp) (45604.0) -
Kernel.#pp でオブジェクトの内容を出力するときに、内部で呼ばれるメソッドです。
Kernel.#pp でオブジェクトの内容を出力するときに、内部で呼ばれるメソッドです。
//emlist[][ruby]{
require 'openssl'
pp 5.to_bn #=> #<OpenSSL::BN 5>
pp (-5).to_bn #=> #<OpenSSL::BN -5>
//}
@param pp PP クラスのインスタンスオブジェクト -
OpenSSL
:: PKey :: EC :: Group # point _ conversion _ form=(sym) (45604.0) -
点のエンコーディング方式を設定します。
点のエンコーディング方式を設定します。
以下のいずれかを設定します。
* :compressed
* :uncompressed
* :hybrid
詳しくは X9.62 (ECDSA) などを参照してください。
@param sym 設定する方式(Symbol)
@see OpenSSL::PKey::EC::Group#point_conversion_form -
Resolv
:: DNS :: Resource :: SOA # expire -> Integer (45604.0) -
プライマリサーバから得たゾーン情報をセカンダリサーバが 何秒間有効なものとして保持するかを返します。
プライマリサーバから得たゾーン情報をセカンダリサーバが
何秒間有効なものとして保持するかを返します。 -
Resolv
:: DNS :: Resource :: SOA # retry -> Integer (45604.0) -
セカンダリサーバがプライマリサーバからの情報更新に失敗した場合に 何秒後にリトライするかを返します。
セカンダリサーバがプライマリサーバからの情報更新に失敗した場合に
何秒後にリトライするかを返します。 -
Shell
:: ProcessController # sfork(command) { . . . } -> [Integer , IO , IO] (45604.0) -
シンプルな fork です。
シンプルな fork です。
@param command コマンドを指定します。
@return [PID, 入力用 IO, 出力用 IO] からなる配列を返します。 -
TracePoint
# return _ value -> object (45604.0) -
メソッドやブロックの戻り値を返します。
メソッドやブロックの戻り値を返します。
@raise RuntimeError :return、:c_return、:b_return イベントのためのイベ
ントフックの外側で実行した場合に発生します。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:return) do |tp|
p tp.return_value # => 1
end
trace.enable
foo 1
//} -
IO
# write _ nonblock(string , exception: true) -> Integer | :wait _ writable (37504.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... -
Ripper
:: Lexer # lex -> [[Integer , Integer] , Symbol , String , Ripper :: Lexer :: State] (37504.0) -
自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。
自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。
ライブラリ内部で使用します。 Ripper.lex を使用してください。 -
Fiddle
:: Pointer # ptr -> Fiddle :: Pointer (37222.0) -
自身の指す値を Pointer にして返します。
自身の指す値を Pointer にして返します。
自身の指す値はポインタであると仮定します。
C 言語におけるポインタのポインタに対する間接参照 *p と同じです。
この返り値には、free 関数がセットされず、size は 0 とされます。
例:
require 'fiddle'
s = 'abc'
cptr = Fiddle::Pointer[s]
cref = cptr.ref
p cref.to_s(4).unpack('l*')[0] #=> 136121648
p cptr.to_i #=> 136121648
... -
BigDecimal
# floor -> Integer (37204.0) -
self 以下の最大整数を返します。
self 以下の最大整数を返します。
@param n 小数点以下の桁数を整数で指定します。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("1.23456").floor # => 1
BigDecimal("-1.23456").floor # => -2
//}
以下のように引数 n を与えることもできます。
n >= 0 なら、小数点以下 n + 1 位の数字を操作します
(小数点以下を、最大 n 桁にします)。
n が負のときは小数点以上 n 桁目を操作します
(小数点位置から左に少なくとも n 個の 0 が並びます... -
Gem
:: Commands :: DependencyCommand # print _ dependencies(spec , level = 0) -> String (37204.0) -
依存関係を表す文字列を返します。
依存関係を表す文字列を返します。
@param spec Gem::Specification のインスタンスを指定します。
@param level 依存関係の深さを指定します。 -
Thread
# pending _ interrupt?(error = nil) -> bool (37204.0) -
self の非同期例外のキューが空かどうかを返します。
self の非同期例外のキューが空かどうかを返します。
@param error 対象の例外クラスを指定します。
@see Thread.pending_interrupt? -
Zlib
:: ZStream # adler -> Integer (37204.0) -
adler-32 チェックサムを返します。
adler-32 チェックサムを返します。 -
Integer
# bit _ length -> Integer (36958.0) -
self を表すのに必要なビット数を返します。
self を表すのに必要なビット数を返します。
「必要なビット数」とは符号ビットを除く最上位ビットの位置の事を意味しま
す。2**n の場合は n+1 になります。self にそのようなビットがない(0 や
-1 である)場合は 0 を返します。
//emlist[例: ceil(log2(int < 0 ? -int : int+1)) と同じ結果][ruby]{
(-2**12-1).bit_length # => 13
(-2**12).bit_length # => 12
(-2**12+1).bit_length # => 12
-0x101.bit... -
Zlib
:: GzipReader # lineno -> Integer (36958.0) -
IO クラスの同名メソッドIO#linenoと同じです。
IO クラスの同名メソッドIO#linenoと同じです。
但し、gzip ファイル中に
エラーがあった場合 Zlib::Error 例外や
Zlib::GzipFile::Error 例外が発生します。
gzip ファイルのフッターの処理に注意して下さい。
gzip ファイルのフッターには圧縮前データのチェックサムが
記録されています。GzipReader オブジェクトは、次の時に展開した
データとフッターの照合を行い、エラーがあった場合は
Zlib::GzipFile::NoFooter, Zlib::GzipFile::CRCError,
Zlib::GzipFile::LengthE... -
Fiddle
:: Pointer # ref -> Fiddle :: Pointer (36922.0) -
自身を指す Pointer オブジェクトを返します。 C 言語におけるポインタへのアドレス演算子の適用 &p と同じです。
自身を指す Pointer オブジェクトを返します。
C 言語におけるポインタへのアドレス演算子の適用 &p と同じです。
この返り値には、free 関数がセットされず、size は 0 とされます。
例:
require 'fiddle'
s = 'abc'
cptr = Fiddle::Pointer[s]
cref = cptr.ref
p cref.to_s(4).unpack('l*')[0] #=> 136121648
p cptr.to_i #=> 136121648
p cref.ptr.to_s ... -
Fiddle
:: Pointer # to _ int -> Integer (36907.0) -
自身が指すアドレスを整数で返します。
自身が指すアドレスを整数で返します。 -
Addrinfo
# protocol -> Integer (36904.0) -
ソケットプロトコルを整数で返します。
ソケットプロトコルを整数で返します。
require 'socket'
Addrinfo.tcp("localhost", 80).protocol == Socket::IPPROTO_TCP #=> true -
BasicSocket
# recvmsg _ nonblock(maxmesglen=nil , flags=0 , maxcontrollen=nil , opts={}) -> [String , Addrinfo , Integer , *Socket :: AncillaryData] (36904.0) -
recvmsg(2) を用いてノンブロッキング方式でメッセージを受け取ります。
recvmsg(2) を用いてノンブロッキング方式でメッセージを受け取ります。
ブロッキングの有無以外は BasicSocket#recvmsg と同じです。
詳しくはそちらを参照してください。
@param maxmesglen 受け取るメッセージの最大長
@param flags フラグ
@param maxcontrollen 受け取る補助データの最大長
@param opts ハッシュオプション -
DRb
:: DRbObject # _ _ drbref -> Integer|nil (36904.0) -
リモートオブジェクトの識別子を返します。
リモートオブジェクトの識別子を返します。
DRb::DRbObject.new_with_uri で取り出したフロントオブジェクトは
識別子を持たないため nil を返します。 -
DRb
:: DRbServer # safe _ level -> Integer (36904.0) -
サーバのセーフレベルを返します。
サーバのセーフレベルを返します。 -
Gem
:: ConfigFile # bulk _ threshold -> Integer (36904.0) -
一括ダウンロードの閾値を返します。 インストールしていない Gem がこの数値を越えるとき一括ダウンロードを行います。
一括ダウンロードの閾値を返します。
インストールしていない Gem がこの数値を越えるとき一括ダウンロードを行います。 -
IO
# print(*arg) -> nil (36904.0) -
引数を IO ポートに順に出力します。引数を省略した場合は、$_ を出力します。
引数を IO ポートに順に出力します。引数を省略した場合は、$_ を出力します。
@param arg Kernel.#print と同じです。
@raise IOError 自身が書き込み用にオープンされていなければ発生します。
@raise Errno::EXXX 出力に失敗した場合に発生します。
//emlist[例][ruby]{
$stdout.print("This is ", 100, " percent.\n") # => This is 100 percent.
//}
@see Kernel.#print -
IO
# printf(format , *arg) -> nil (36904.0) -
C 言語の printf と同じように、format に従い引数 を文字列に変換して、self に出力します。
C 言語の printf と同じように、format に従い引数
を文字列に変換して、self に出力します。
第一引数に IO を指定できないこと、引数を省略できないことを除けば Kernel.#printf と同じです。
@param format Kernel.#printf と同じです。print_format を参照してください。
@param arg Kernel.#printf と同じです。
@raise IOError 自身が書き込み用にオープンされていなければ発生します。
@raise Errno::EXXX 出力に失敗した場合に発生します。
@see Ker... -
IRB
:: Context # back _ trace _ limit -> Integer (36904.0) -
エラー発生時のバックトレース表示の先頭、末尾の上限の行数を返します。
エラー発生時のバックトレース表示の先頭、末尾の上限の行数を返します。
デフォルト値は 16 です。
@see IRB::Context#back_trace_limit= -
IRB
:: Context # eval _ history -> Integer | nil (36904.0) -
実行結果の履歴の最大保存件数を Integer か nil で返します。
実行結果の履歴の最大保存件数を Integer か nil で返します。
@return 履歴の最大保存件数を Integer か nil で返します。0 を返し
た場合は無制限に保存します。nil を返した場合は追加の保存は行いません。
@see IRB::Context#eval_history= -
IRB
:: Context # ignore _ sigint -> bool (36904.0) -
Ctrl-C が入力された時に irb を終了するかどうかを返します。
Ctrl-C が入力された時に irb を終了するかどうかを返します。
false の時は irb を終了します。true の時は以下のように動作します。
: 入力中
これまで入力したものをキャンセルしトップレベルに戻る.
: 実行中
実行を中止する.
デフォルト値は true です。
@see IRB::Context#ignore_sigint= -
IRB
:: Context # ignore _ sigint=(val) (36904.0) -
Ctrl-C が入力された時に irb を終了するかどうかを val に設定します。
Ctrl-C が入力された時に irb を終了するかどうかを val に設定します。
.irbrc ファイル中で IRB.conf[:IGNORE_SIGINT] を設定する事でも同様の操作
が行えます。
@param val false を指定した場合、Ctrl-C の入力時に irb を終了します。
true を指定した場合、Ctrl-C の入力時に以下のように動作します。
: 入力中
これまで入力したものをキャンセルしトップレベルに戻る.
: 実行中
実行を中止する.
@see IRB::Context#ignore_sigint -
IRB
:: Context # ignore _ sigint? -> bool (36904.0) -
Ctrl-C が入力された時に irb を終了するかどうかを返します。
Ctrl-C が入力された時に irb を終了するかどうかを返します。
false の時は irb を終了します。true の時は以下のように動作します。
: 入力中
これまで入力したものをキャンセルしトップレベルに戻る.
: 実行中
実行を中止する.
デフォルト値は true です。
@see IRB::Context#ignore_sigint= -
IRB
:: OutputMethod # printn(*objs) -> nil (36904.0) -
各 obj を self に出力し、最後に改行を出力します。
各 obj を self に出力し、最後に改行を出力します。
@param objs 任意のオブジェクトを指定します。 -
IRB
:: StdioOutputMethod # print(*objs) -> nil (36904.0) -
引数を標準出力に出力します。
引数を標準出力に出力します。
@param objs 任意のオブジェクトを指定します。 -
Integer
# ceil(ndigits = 0) -> Integer (36904.0) -
self と等しいかより大きな整数のうち最小のものを返します。
self と等しいかより大きな整数のうち最小のものを返します。
@param ndigits 10進数での小数点以下の有効桁数を整数で指定します。
負の整数を指定した場合、小数点位置から左に少なくとも n 個の 0 が並びます。
//emlist[][ruby]{
1.ceil # => 1
1.ceil(2) # => 1
18.ceil(-1) # => 20
(-18).ceil(-1) # => -10
//}
@see Numeric#ceil -
Integer
# gcdlcm(n) -> [Integer] (36904.0) -
自身と整数 n の最大公約数と最小公倍数の配列 [self.gcd(n), self.lcm(n)] を返します。
自身と整数 n の最大公約数と最小公倍数の配列 [self.gcd(n), self.lcm(n)]
を返します。
@raise ArgumentError n に整数以外のものを指定すると発生します。
//emlist[][ruby]{
2.gcdlcm(2) # => [2, 2]
3.gcdlcm(-7) # => [1, 21]
((1<<31)-1).gcdlcm((1<<61)-1) # => [1, 4951760154835678088235319297]
//}
@see Integer#gc... -
Integer
# lcm(n) -> Integer (36904.0) -
自身と整数 n の最小公倍数を返します。
自身と整数 n の最小公倍数を返します。
@raise ArgumentError n に整数以外のものを指定すると発生します。
//emlist[][ruby]{
2.lcm(2) # => 2
3.lcm(-7) # => 21
((1<<31)-1).lcm((1<<61)-1) # => 4951760154835678088235319297
//}
また、self や n が 0 だった場合は、0 を返します。
//emlist[][ruby]{
3.lcm(0) ... -
JSON
:: State # buffer _ initial _ length -> Integer (36904.0) -
This integer returns the current initial length of the buffer.
This integer returns the current initial length of the buffer. -
Logger
# sev _ threshold -> Integer (36904.0) -
レシーバにセットされているログレベルを取得します。
レシーバにセットされているログレベルを取得します。
//emlist[例][ruby]{
require 'logger'
logger = Logger.new(STDOUT)
logger.level # => 0
logger.level = Logger::Severity::ERROR
logger.level # => 3
//} -
Method
# source _ location -> [String , Integer] | nil (36904.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... -
Net
:: HTTP # local _ port -> nil | Integer | String (36904.0) -
接続に用いるローカルポートを返します。
接続に用いるローカルポートを返します。
nil の場合システムが適当にローカルポートを
決めます。
デフォルトは nil です。
@see Net::HTTP#local_port=, Net::HTTP#local_host -
Net
:: HTTPHeader # range _ length -> Integer|nil (36904.0) -
Content-Range: ヘッダフィールドの表している長さを整数で返します。
Content-Range: ヘッダフィールドの表している長さを整数で返します。
ヘッダが設定されていない場合には nil を返します。
@raise Net::HTTPHeaderSyntaxError Content-Range: ヘッダフィールド
の値が不正である場合に
発生します。
//emlist[例][ruby]{
require 'net/http'
uri = UR... -
Numeric
# floor(ndigits = 0) -> Integer (36904.0) -
自身と等しいかより小さな整数のうち最大のものを返します。
自身と等しいかより小さな整数のうち最大のものを返します。
@param ndigits 10進数での小数点以下の有効桁数を整数で指定します。
負の整数を指定した場合、小数点位置から左に少なくとも n 個の 0 が並びます。
//emlist[例][ruby]{
1.floor #=> 1
1.2.floor #=> 1
(-1.2).floor #=> -2
(-1.5).floor #=> -2
//}
@see Numeric#ceil, Numeric#round, Numeric#truncate
@see Inte... -
Numeric
# integer? -> bool (36904.0) -
自身が Integer かそのサブクラスのインスタンスの場合にtrue を返し ます。そうでない場合に false を返します。
自身が Integer かそのサブクラスのインスタンスの場合にtrue を返し
ます。そうでない場合に false を返します。
Numeric のサブクラスは、このメソッドを適切に再定義しなければなりません。
//emlist[例][ruby]{
(1.0).integer? #=> false
(1).integer? #=> true
//}
@see Numeric#real? -
OpenSSL
:: PKCS7 :: RecipientInfo # serial -> Integer (36904.0) -
送信先の証明書の識別番号を返します。
送信先の証明書の識別番号を返します。
これと OpenSSL::PKCS7::RecipientInfo#issuer で
送信先を一意に識別します。 -
OpenSSL
:: PKey :: EC :: Point # group -> OpenSSL :: PKey :: EC :: Group (36904.0) -
自身と関連付けられた群を返します。
自身と関連付けられた群を返します。 -
OpenSSL
:: SSL :: SSLContext # ciphers -> [[String , String , Integer , Integer]] (36904.0) -
利用可能な共通鍵暗号の種類を配列で返します。
利用可能な共通鍵暗号の種類を配列で返します。
配列の各要素は以下のような配列です
[暗号方式の名前の文字列, 利用可能なSSL/TLSのバージョン文字列, 鍵長(ビット数), アルゴリズムのビット長]
例:
require 'openssl'
ctx = OpenSSL::SSL::SSLContext.new('TLSv1')
ctx.ciphers
# => [["DHE-RSA-AES256-SHA", "TLSv1/SSLv3", 256, 256],
# ["DHE-DSS-AES256-SHA", "TLSv1/SSLv3", 256, 256]... -
OpenSSL
:: SSL :: SSLContext # verify _ depth -> Integer | nil (36904.0) -
証明書チェイン上の検証する最大の深さを返します。
証明書チェイン上の検証する最大の深さを返します。
デフォルトは nil です。
@see OpenSSL::SSL::SSLContext#verify_depth= -
OpenSSL
:: SSL :: SSLContext # verify _ mode -> Integer | nil (36904.0) -
検証モードを返します。
検証モードを返します。
デフォルトは nil です。
@see OpenSSL::SSL::SSLContext#verify_mode= -
OpenSSL
:: SSL :: SSLSocket # cipher -> [String , String , Integer , Integer] (36904.0) -
現在実際に使われている暗号の情報を配列で返します。
現在実際に使われている暗号の情報を配列で返します。
返される配列の形式は以下の例のように [暗号名, TLS/SSLのバージョン, 鍵長, アルゴリズムで使われる bit 数] となります。
["DES-CBC3-SHA", "TLSv1/SSLv3", 168, 168]
OpenSSL::SSL::SSLSocket#connect や OpenSSL::SSL::SSLSocket#accept
で SSL/TLS ハンドシェイクを行う前にこのメソッドを呼ぶと nil を返します。 -
OpenSSL
:: SSL :: SSLSocket # syswrite(string) -> Integer (36904.0) -
データをバッファを経由せずに暗号化通信路に書き込みます。
データをバッファを経由せずに暗号化通信路に書き込みます。
書き込んだバイト数を整数で返します。
基本的にはこのメソッドは使わず、OpenSSL::Buffering の
メソッドを使ってデータを書き込むべきです。
IO#syswrite と同様です。
@param string 書き込むデータ文字列
@raise OpenSSL::SSL::SSLError 書き込みに失敗した場合に発生します -
OpenSSL
:: SSL :: SocketForwarder # fcntl(cmd , arg=0) -> Integer (36904.0) -
ラップされているソケットに対してシステムコール fcntl を実行します。
ラップされているソケットに対してシステムコール fcntl を実行します。
IO#fcntl と同様です。
@param cmd IO に対するコマンドを、添付ライブラリ fcntl が提供している定数で指定します。
@param arg cmd に対する引数を整数、文字列、booleanのいずれかで指定します。
@raise Errno::EXXX fcntl の実行に失敗した場合に発生します。
@raise IOError 既に close されている場合に発生します。 -
OpenSSL
:: X509 :: Certificate # serial -> Integer (36904.0) -
発行者 (CA) が証明書に付ける識別番号を返します。
発行者 (CA) が証明書に付ける識別番号を返します。
@see OpenSSL::X509::Certificate#serial= -
Proc
# source _ location -> [String , Integer] | nil (36904.0) -
ソースコードのファイル名と行番号を配列で返します。
ソースコードのファイル名と行番号を配列で返します。
その手続オブジェクトが ruby で定義されていない(つまりネイティブ
である)場合は nil を返します。
//emlist[例][ruby]{
# /path/to/target.rb を実行
proc {}.source_location # => ["/path/to/target.rb", 1]
proc {}.source_location # => ["/path/to/target.rb", 2]
(eval "proc {}").source_location # => ...