ライブラリ
- ビルトイン (1465)
-
cgi
/ html (24) - date (4)
- delegate (12)
-
fiddle
/ import (72) - forwardable (48)
-
irb
/ input-method (36) - json (24)
- matrix (24)
-
net
/ ftp (20) -
net
/ http (156) -
net
/ imap (12) - openssl (12)
- optparse (24)
- pathname (72)
- prime (72)
- rake (216)
-
rake
/ packagetask (12) -
rdoc
/ markup (12) -
rdoc
/ parser (12) -
rexml
/ document (24) -
rinda
/ tuplespace (12) -
rubygems
/ dependency _ installer (12) -
rubygems
/ dependency _ list (36) -
rubygems
/ installer (12) -
rubygems
/ spec _ fetcher (24) -
rubygems
/ specification (96) - shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6) - socket (24)
- strscan (24)
- tsort (33)
-
webrick
/ httputils (108) - zlib (120)
クラス
-
ARGF
. class (48) - Array (93)
- BasicSocket (12)
- Class (12)
- Data (6)
- Date (2)
- DateTime (2)
- Dir (24)
-
Encoding
:: Converter (48) - Enumerator (120)
-
Enumerator
:: ArithmeticSequence (35) -
Enumerator
:: Lazy (48) -
Enumerator
:: Yielder (30) - Exception (12)
- File (24)
-
File
:: Stat (72) -
Gem
:: DependencyInstaller (12) -
Gem
:: DependencyList (36) -
Gem
:: Installer (12) -
Gem
:: SpecFetcher (24) -
Gem
:: Specification (96) - IO (48)
-
IRB
:: InputMethod (12) -
IRB
:: ReadlineInputMethod (12) -
IRB
:: StdioInputMethod (12) -
JSON
:: State (12) - LoadError (12)
- MatchData (104)
- Matrix (24)
- Method (12)
- Module (252)
-
Net
:: FTP (20) -
Net
:: HTTP (156) -
Net
:: IMAP (12) - Numeric (81)
- Object (72)
-
OpenSSL
:: SSL :: SSLContext (12) - OptionParser (24)
- Pathname (72)
- Prime (24)
-
Prime
:: PseudoPrimeGenerator (48) - Proc (6)
-
RDoc
:: Markup (12) -
RDoc
:: Parser (12) -
REXML
:: Attributes (24) -
Rake
:: Application (84) -
Rake
:: FileList (48) -
Rake
:: FileTask (12) -
Rake
:: InvocationChain (36) -
Rake
:: InvocationChain :: EmptyInvocationChain (12) -
Rake
:: PackageTask (12) - Random (36)
- Range (6)
- Regexp (24)
-
Rinda
:: TupleSpace (12) -
RubyVM
:: InstructionSequence (24) - Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6) - StopIteration (12)
- String (36)
- StringScanner (24)
- SystemExit (12)
- Thread (12)
-
Thread
:: Backtrace :: Location (48) - TracePoint (12)
- UDPSocket (12)
-
WEBrick
:: HTTPUtils :: FormData (108) -
Zlib
:: Deflate (36) -
Zlib
:: GzipReader (36) -
Zlib
:: Inflate (48)
モジュール
-
CGI
:: HtmlExtension (24) - Enumerable (84)
-
Fiddle
:: Importer (72) - FileUtils (12)
- Forwardable (48)
-
JSON
:: Generator :: GeneratorMethods :: Object (12) - Kernel (12)
-
Rake
:: TaskManager (12) - TSort (33)
キーワード
- << (24)
- == (7)
- === (6)
- DelegateClass (12)
- [] (96)
-
absolute
_ path (24) - accept (12)
-
add
_ dependency (12) -
add
_ development _ dependency (12) -
add
_ runtime _ dependency (12) -
add
_ special (12) - allocate (12)
- append (36)
-
append
_ data (12) -
append
_ features (12) - ascend (24)
- attr (36)
-
attr
_ accessor (12) -
attr
_ reader (12) -
attr
_ writer (12) - autoload (12)
-
backtrace
_ locations (12) -
base
_ label (12) - begin (19)
- bind (12)
- blockdev? (12)
- byteend (2)
- byteoffset (6)
- chardev? (12)
-
check
_ circular? (12) - chunk (12)
-
const
_ source _ location (12) -
create
_ rule (12) -
create
_ value (12) - deconstruct (3)
-
deconstruct
_ keys (7) -
def
_ delegator (12) -
def
_ instance _ delegator (12) - delegate (12)
- dependencies (12)
-
dependency
_ order (12) -
dependent
_ gems (12) - descend (24)
-
development
_ dependencies (12) - each (132)
-
each
_ attribute (12) -
each
_ byte (36) -
each
_ codepoint (12) -
each
_ data (12) -
each
_ entry (12) -
each
_ index (12) -
each
_ line (48) -
each
_ strongly _ connected _ component (11) -
each
_ strongly _ connected _ component _ from (11) -
each
_ with _ index (60) - egrep (12)
-
enum
_ for (48) -
exclude
_ end? (7) - extern (12)
- fdatasync (12)
- feed (12)
- fetch (12)
- filename (12)
- filename= (12)
-
find
_ matching (12) -
find
_ name (12) - finish (12)
- flush (12)
-
gather
_ dependencies (12) - get (24)
- get2 (24)
- gsub! (12)
- hash (7)
- html (24)
- inflate (12)
- inspect (12)
-
installation
_ satisfies _ dependency? (12) -
instance
_ delegate (12) - lazy (12)
- list (12)
- lstat (12)
- match (24)
- match? (12)
-
matched
_ size (12) -
max
_ by (24) - member? (12)
- mkdir (18)
- mlsd (20)
- name (24)
- name= (12)
- next (12)
-
next
_ values (12) - notify (12)
- offset (24)
- opendir (24)
-
original
_ dir (12) - pack (21)
-
package
_ dir _ path (12) - params (12)
-
parse
_ files _ matching (12) - path (48)
- pathmap (12)
-
peek
_ values (12) - post (24)
- post2 (24)
-
prepend
_ features (12) -
primitive
_ convert (48) - private (48)
-
private
_ class _ method (24) -
private
_ constant (12) -
private
_ instance _ methods (12) -
private
_ method _ defined? (12) - rakefile (12)
- rand (36)
-
readable
_ atfer _ eof? (36) -
recvfrom
_ nonblock (12) - recvmsg (12)
-
remove
_ by _ name (12) -
remove
_ const (12) -
renegotiation
_ cb= (12) -
request
_ get (24) -
request
_ post (24) -
respond
_ to _ missing? (12) - result (12)
-
ruby2
_ keywords (18) -
runtime
_ dependencies (12) -
satisfies
_ requirement? (12) -
send
_ request (12) - separator (12)
-
set
_ dictionary (24) - setgid? (12)
- setuid? (12)
- sh (12)
- socket? (12)
-
sort
_ by (12) -
source
_ location (12) - stat (12)
- status (12)
- step (81)
- sticky? (12)
- struct (12)
- sub! (12)
- terminate (12)
-
to
_ ary (12) -
to
_ enum (48) -
to
_ json (12) -
to
_ path (12) -
to
_ proc (6) -
to
_ regexp (12) -
to
_ s (24) -
top
_ level (12) -
top
_ level _ tasks (12) - truncate (12)
-
tsort
_ each (11) -
tty
_ output= (12) - union (12)
- unpack (12)
- value (12)
-
with
_ index (24) -
with
_ object (24) - yield (12)
検索結果
先頭5件
-
Range
# ===(obj) -> bool (25.0) -
始端と終端の中に obj があるとき、true を返します。 そうでないとき、false を返します。
...se
p (60...80) === 79 #=> true
case 79
when 0...60 then puts "low"
when 60...80 then puts "medium" # => medium
when 80..100 then puts "high"
end
//}
2.5 以前は、単純に Range#include? メソッドを内部で呼んでいました。
しかし、2.6 以降では、(文字列を除い......りません。
//emlist[例][ruby]{
require 'date'
p (Date.today - 100...Date.today + 100).include?(DateTime.now) #=> false
p (Date.today - 100...Date.today + 100).cover?(DateTime.now) #=> true
p (Date.today - 100...Date.today + 100) === DateTime.now #=> true
# 2.5 以前は、=== は......Range#cover? と同様の処理をするようになりました。
//emlist[例][ruby]{
p ('a'..'z').include? 'at' #=> false
p ('a'..'z').cover? 'at' #=> true
p ('a'..'z') === 'at' #=> true
# 2.6 以前は、=== は、include? と同じく比較できず false を返していました... -
Module
# ruby2 _ keywords(method _ name , . . . ) -> nil (19.0) -
For the given method names, marks the method as passing keywords through a normal argument splat. This should only be called on methods that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the method such that if the method is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the method to other methods.
...al argument splat. This should only be called on methods that
accept an argument splat (`*args`) but not explicit keywords or a
keyword splat. It marks the method such that if the method is called
with keyword arguments, the final hash argument is marked with a special
flag such that if it is the......argument splat to
another method call, and that method call does not include explicit
keywords or a keyword splat, the final element is interpreted as
keywords. In other words, keywords will be passed through the method to
other methods.
This should only be used for methods that delegate keywords t......ackwards compatibility with Ruby versions before
2.7.
This method will probably be removed at some point, as it exists only
for backwards compatibility. As it does not exist in Ruby versions
before 2.7, check that the module responds to this method before calling
it. Also, be aware that if this met... -
Proc
# ruby2 _ keywords -> proc (19.0) -
Marks the proc as passing keywords through a normal argument splat. This should only be called on procs that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the proc such that if the proc is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the proc to other methods.
...ormal argument splat. This
should only be called on procs that accept an argument splat (`*args`)
but not explicit keywords or a keyword splat. It marks the proc such
that if the proc is called with keyword arguments, the final hash
argument is marked with a special flag such that if it is the fina......l argument splat to another method call, and that
method call does not include explicit keywords or a keyword splat, the
final element is interpreted as keywords. In other words, keywords will
be passed through the proc to other methods.
This should only be used for procs that delegate keywords to......backwards compatibility with Ruby versions before
2.7.
This method will probably be removed at some point, as it exists only
for backwards compatibility. As it does not exist in Ruby versions
before 2.7, check that the proc responds to this method before calling
it. Also, be aware that if this meth... -
UDPSocket
# recvfrom _ nonblock(maxlen , flags=0) -> [String , Array] (19.0) -
ソケットをノンブロッキングモードに設定した後、 recvfrom(2) でソケットからデータを受け取ります。
...IO::WaitReadable が extend
されています。
require 'socket'
s1 = UDPSocket.new
s1.bind("127.0.0.1", 0)
s2 = UDPSocket.new
s2.bind("127.0.0.1", 0)
s2.connect(*s1.addr.values_at(3,1))
s1.connect(*s2.addr.values_at(3,1))
s1.send "aaa", 0
begin # emulate blocking recvfrom
p......s2.recvfrom_nonblock(10)
#=> ["aaa", ["AF_INET", 33302, "localhost.localdomain", "127.0.0.1"]]
rescue IO::WaitReadable
IO.select([s2])
retry
end
@param maxlen 受け取るデータの最大バイト数
@param flags フラグ
@see IPSocket#recvfrom... -
Module
# remove _ const(name) -> object (13.0) -
name で指定した定数を取り除き、その定数に設定されていた値を 返します。
...発生します。
//emlist[例][ruby]{
class Foo
FOO = 1
p remove_const(:FOO) # => 1
p FOO # => uninitialized constant FOO at Foo (NameError)
end
//}
組み込みクラス/モジュールを設定している定数や Kernel.#autoload を指定した(まだロードしてない)定... -
Array
# [](nth) -> object | nil (6.0) -
nth 番目の要素を返します。nth 番目の要素が存在しない時には nil を返します。
nth 番目の要素を返します。nth 番目の要素が存在しない時には nil を返します。
@param nth インデックスを整数で指定します。
先頭の要素が 0 番目になります。nth の値が負の時には末尾から
のインデックスと見倣します。末尾の要素が -1 番目になります。
整数以外のオブジェクトを指定した場合は to_int メソッドによる
暗黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定... -
Array
# [](start , length) -> Array | nil (6.0) -
start 番目から length 個の要素を含む部分配列を返します。 start が自身の範囲外となる時は nil を返します。ただし、start が配列の長さに等しいときは空の配列を返します。 length が負の時は nil を返します。
start 番目から length 個の要素を含む部分配列を返します。
start が自身の範囲外となる時は nil を返します。ただし、start が配列の長さに等しいときは空の配列を返します。
length が負の時は nil を返します。
@param start 生成したい部分配列の先頭のインデックスを整数で指定します。
start の値が負の時には末尾からのインデックスと見倣します。
末尾の要素が -1 番目になります。
整数以外のオブジェクトを指定した場合は to_int メソッドによ
...