種類
ライブラリ
- ビルトイン (912)
- benchmark (11)
- bigdecimal (33)
-
bigdecimal
/ math (11) - date (11)
- fileutils (33)
- forwardable (11)
- ipaddr (33)
- logger (1)
- matrix (33)
- monitor (22)
-
net
/ http (22) - nkf (22)
- openssl (44)
- optparse (143)
- prime (33)
- psych (99)
-
rexml
/ document (33) -
rexml
/ parsers / sax2parser (55) -
rexml
/ streamlistener (88) -
rinda
/ rinda (22) -
rinda
/ tuplespace (11) -
ripper
/ filter (11) - rubygems (11)
-
rubygems
/ requirement (33) - sdbm (22)
- set (7)
- singleton (11)
- socket (22)
- stringio (11)
- thread (4)
- timeout (41)
- tracer (22)
-
webrick
/ httputils (11) - win32ole (88)
クラス
- Array (32)
- BigDecimal (33)
- Bignum (3)
- Data (4)
-
Gem
:: Requirement (33) - Hash (11)
- IO (44)
- IPAddr (22)
- Integer (11)
- Matrix (22)
- Module (19)
-
Net
:: HTTP (22) - Object (66)
- OptionParser (132)
- Prime (22)
- Proc (11)
-
Psych
:: Handler (66) -
Psych
:: Nodes :: Document (11) -
REXML
:: Entity (22) -
REXML
:: Parsers :: SAX2Parser (55) - Range (5)
- Regexp (44)
-
Rinda
:: DRbObjectTemplate (11) -
Rinda
:: TupleSpace (11) - SDBM (22)
- Set (7)
- Socket (22)
- String (165)
- Struct (14)
- Thread (22)
- Tracer (22)
- Vector (11)
モジュール
- Benchmark (11)
- BigMath (11)
- Enumerable (80)
- FileUtils (33)
- Kernel (242)
- Math (22)
- NKF (11)
- ObjectSpace (22)
-
REXML
:: StreamListener (88) - Timeout (19)
キーワード
-
$ _ (11) - % (11)
- * (11)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - <=> (11)
- =~ (22)
- Application (1)
- BasicObject (11)
- Buffering (11)
- Cipher (11)
- ConditionVariable (11)
- DATA (11)
- DateTime (11)
- Extension (11)
- ExternalEntity (11)
- Fiber (11)
- FileTest (11)
- Filter (11)
- FormData (11)
- IO (11)
- IPAddr (11)
- Location (11)
- Marshal フォーマット (11)
- Monitor (11)
- MonitorMixin (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 3 . 0 (9) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) - NKF (11)
- Numeric (11)
- OptionParser (11)
- Prime (11)
- Range (11)
- ReFe (11)
- Ruby用語集 (11)
- STDERR (11)
- STDIN (11)
- STDOUT (11)
- Session (11)
- SingleForwardable (11)
- Singleton (11)
- SizedQueue (11)
- Status (11)
- StringIO (11)
- Template (11)
- Time (11)
- TracePoint (11)
- TreeBuilder (11)
- WIN32OLE (11)
-
WIN32OLE
_ EVENT (11) -
WIN32OLE
_ METHOD (11) -
WIN32OLE
_ PARAM (11) -
WIN32OLE
_ TYPE (11) -
WIN32OLE
_ TYPELIB (11) -
WIN32OLE
_ VARIABLE (11) -
WIN32OLE
_ VARIANT (11) - YAMLTree (11)
- [] (66)
-
add
_ filter (22) - alias (11)
- all? (13)
- any? (14)
- asinh (11)
- atan (11)
- attlistdecl (11)
- benchmark (11)
- bigdecimal (11)
- cdata (11)
- cgi (11)
-
cgi
/ session (11) - columns (11)
- debug (11)
- define (4)
-
define
_ finalizer (22) - diagonal (11)
- doctype (11)
- each (22)
- elementdecl (11)
-
end
_ document (11) - exec (44)
- fiddle (11)
-
fiddle
/ import (11) - find (11)
-
for
_ fd (11) - format (11)
- gem (11)
-
get
_ print (22) - getaddrinfo (11)
- getnameinfo (11)
- grep (11)
-
grep
_ v (11) -
handle
_ interrupt (11) - include? (23)
- instruction (11)
- invert (11)
- irb (11)
-
irb
/ completion (11) -
irb
/ xmp (11) - length (11)
- listen (55)
- load (11)
- logger (11)
- match (22)
-
minitest
/ mock (1) -
minitest
/ spec (1) -
minitest
/ unit (1) - mode (22)
-
module
_ function (19) - monitor (11)
-
net
/ imap (11) -
net
/ pop (11) - new (58)
- nkf (11)
- notify (11)
- on (132)
- open (44)
- open-uri (11)
- optparse (11)
- pack (19)
- pack テンプレート文字列 (11)
-
pending
_ interrupt? (11) - prettyprint (11)
- prime (11)
- profile (6)
- rake (11)
- rdoc (11)
-
rdoc
/ generator / json _ index (11) -
require
_ relative (11) -
rexml
/ parsers / ultralightparser (11) -
rinda
/ rinda (11) -
rm
_ r (11) -
rm
_ rf (11) - rmtree (11)
-
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 8 . 3 feature (11) -
ruby 1
. 9 feature (11) -
rubygems
/ security (11) -
satisfied
_ by? (11) - scalar (11)
- sinh (11)
- size (11)
- slice (66)
-
slice
_ after (22) -
slice
_ before (22) - spawn (44)
- sprintf (11)
- sprintf フォーマット (11)
-
start
_ document (11) -
start
_ mapping (11) -
start
_ sequence (11) - system (44)
-
tag
_ end (11) -
tag
_ start (11) - tempfile (11)
-
test
/ unit (1) - timeout (41)
- tracer (11)
- tsort (11)
- unpack (11)
- uri (11)
- webrick (11)
-
webrick
/ cgi (11) -
win32
/ registry (11) - xmldecl (11)
- xmlrpc (3)
- yield (11)
- zlib (11)
- オブジェクト指向スクリプト言語 Ruby リファレンスマニュアル (11)
- セキュリティモデル (11)
- 制御構造 (11)
- 演算子式 (11)
検索結果
先頭5件
-
irb (26132.0)
-
irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
...irb は Interactive Ruby の略です。
irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
=== irb の使い方
Ruby さえ知っていれば irb を使うのは簡単です。
irb コマンドを実行すると、以下のようなプロン......。
$ irb
irb(main):001:0>
あとは Ruby の式を入力するだけで、その式が実行され、結果が表示されます。
irb(main):001:0> 1+2
3
irb(main):002:0> class Foo
irb(main):003:1> def foo
irb(main):004:2> print 1
irb(main):005:2> end
irb(main):006:1>......end
:foo
irb(main):007:0>
また irb コマンドは readline ライブラリにも対応しています。
readline ライブラリがインストールされている時には
自動的にコマンドライン編集や履歴の機能が使えるようになります。
=== irb のコマン... -
irb
/ xmp (26024.0) -
Ruby のソースコードとその実行結果を、行ごとに交互に表示するためのライブ ラリです。irb を実行しなくても、使用することが出来ます。
...。irb を実行しなくても、使用することが出来ます。
実行結果を得るためには、Kernel#xmp と、XMP#puts を使った方
法があります。どちらの場合も XMP がコンテキスト情報を保持するため、
実行結果に差分はありません。(Binding......タイミングは違い
ます)
=== 関数(Kernel#xmp)を使って実行結果を得る
Kernel#xmp では、以下のように Ruby のソースコードを文字列として渡
す事で実行結果を標準出力に表示します。
$ cat t.rb
require "irb/xmp"
xmp <<END
foo = 1
foo......==>1
foo
==>1
=== XMP インスタンス(XMP#puts)を使って実行結果を得る
XMP#puts では、以下のように Ruby のソースコードを文字列として渡す
事で実行結果を標準出力に表示します。
$ cat t.rb
require "irb/xmp"
xmp = XMP.new
x... -
irb
/ completion (26006.0) -
irb の completion 機能を提供するライブラリです。
...irb の completion 機能を提供するライブラリです。
=== 使い方
$ irb -r irb/completion
とするか, ~/.irbrc 中に
require "irb/completion"
を入れてください.
irb実行中に require "irb/completion" してもよいです.
irb 実行中に [Tab] を押すとコ......全に補完します.
irb(main):001:0> in
in inspect instance_eval
include install_alias_method instance_of?
initialize install_aliases instance_variables
irb(main):001:0> inspect
"main"
irb(main):002:0> foo = Objec......覧がでます.
irb(main):003:0> foo.
foo.== foo.frozen? foo.protected_methods
foo.=== foo.hash foo.public_methods
foo.=~ foo.id foo.respond_to?
foo.__id__ foo.inspect f... -
オブジェクト指向スクリプト言語 Ruby リファレンスマニュアル (23012.0)
-
オブジェクト指向スクリプト言語 Ruby リファレンスマニュアル * Ruby オフィシャルサイト https://www.ruby-lang.org/ja/ * 原著:まつもとゆきひろ * 最新版URL: https://www.ruby-lang.org/ja/documentation/
...ntation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃っています。
標準添付ライブラリのリファレンスは一部未完成です。
それ以外のドキュメントについては、まだまだ書き直しが必要です。
=== 目次
* spec/intro......ycmd
* spec/envvars
==== Ruby 言語仕様
Ruby でのオブジェクト:
* spec/object
* spec/class
プロセスの実行:
* spec/eval
* spec/terminate
* spec/thread
* spec/safelevel
Ruby の文法:
* spec/lexical
* spec/program
* spec/variables
* spec/literal
* spec/oper......f
その他:
* spec/m17n
* spec/regexp
* spec/lambda_proc
==== 組み込みライブラリ
* _builtin
==== 標準添付ライブラリ
* /
==== C API
* /
==== その他
* news/index
* pack_template
* print_format
* glossary
* symref
* marshal_format
* license
* help......アル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 2.3 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃っていま......す。
=== 目次
* spec/intro
* spec/commands
* spec/rubycmd
* spec/envvars
==== Ruby 言語仕様
Ruby でのオブジェクト:
* spec/object
* spec/class
プロセスの実行:
* spec/eval
* spec/terminate
* spec/thread
* spec/safelevel
Ruby の文法:
* spec/lexical
*......* spec/variables
* spec/literal
* spec/operator
* spec/control
* spec/call
* spec/def
その他:
* spec/m17n
* spec/regexp
* spec/lambda_proc
==== 組み込みライブラリ
* _builtin
==== 標準添付ライブラリ
* /
==== C API
* /
==== その他
* news/index
* p......アル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 2.4 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃っていま......アル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 2.5 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃っていま......アル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 2.6 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃っていま......アル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 2.7 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃っていま......アル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 3.0 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃っていま......アル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 3.1 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃っていま......アル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 3.2 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃っていま......必要です。
=== 目次
* spec/intro
* spec/commands
* spec/rubycmd
* spec/envvars
==== Ruby 言語仕様
Ruby でのオブジェクト:
* spec/object
* spec/class
プロセスの実行:
* spec/eval
* spec/terminate
* spec/thread
Ruby の文法:
* spec/lexical
* spec/progr......アル
* Ruby オフィシャルサイト https://www.ruby-lang.org/ja/
* version 3.3 対応リファレンス
* 原著:まつもとゆきひろ
* 最新版URL: https://www.ruby-lang.org/ja/documentation/
=== 使用上の注意
組込みクラスのリファレンスはほぼ揃っていま... -
Gem
:: Requirement # ===(version) -> bool (21200.0) -
引数 version が自身に含まれる全ての必要条件を満たす場合に true を返します。 そうでなければ、false を返します。
...version が自身に含まれる全ての必要条件を満たす場合に true を返します。
そうでなければ、false を返します。
@param version Gem::Version のインスタンスを指定します。
//emlist[][ruby]{
req = Gem::Requirement.new("~> 3.2.1")
p req.satisfied_by?(......Gem::Version.new('3.2.9')) # => true
p req.satisfied_by?(Gem::Version.new('3.3.0')) # => false
//}... -
IPAddr
# ===(ipaddr) -> bool (21200.0) -
与えられた IPAddr オブジェクトが自身の範囲に入っているかを判定します。
...与えられた IPAddr オブジェクトが自身の範囲に入っているかを判定します。
@param ipaddr 範囲に入っているかどうか調べる対象となる IPAddr オブジェクト。
また、数値や文字列も受け付けます。... -
Rinda
:: DRbObjectTemplate # ===(ro) (21100.0) -
@todo
...@todo
This DRbObjectTemplate matches +ro+ if the remote object's drburi
and drbref are the same. +nil+ is used as a wildcard.... -
Regexp
# ===(string) -> bool (18212.0) -
文字列 string との正規表現マッチを行います。 マッチした場合は真を返します。
...文字列 string との正規表現マッチを行います。
マッチした場合は真を返します。
string が文字列でもシンボルでもない場合には false を返します。
このメソッドは主にcase文での比較に用いられます。
@param string マッチ対象......文字列
//emlist[例][ruby]{
a = "HELLO"
case a
when /\A[a-z]*\z/; puts "Lower case"
when /\A[A-Z]*\z/; puts "Upper case"
else; puts "Mixed case"
end
# => Upper case
/\A[a-z]*\z/ === "HELLO" # => false
/\A[A-Z]*\z/ === "HELLO" # => true
//}
@see Enumerable#grep, Object#===... -
Object
# ===(other) -> bool (18112.0) -
case 式で使用されるメソッドです。d:spec/control#case も参照してください。
...when 節の式をレシーバーとして === を呼び出すことに注意してください。
また Enumerable#grep でも使用されます。
@param other 比較するオブジェクトです。
//emlist[][ruby]{
age = 12
# (0..2).===(12), (3..6).===(12), ... が実行される
result =......aby"
when 3 .. 6
"little child"
when 7 .. 12
"child"
when 13 .. 18
"youth"
else
"adult"
end
puts result #=> "child"
def check arg
case arg
when /ruby(?!\s*on\s*rails)/i
"hit! #{arg}"
when String
"Instance of String class. But don't hit."
else
"unknown"......end
end
puts check([]) #=> unknown
puts check("mash-up in Ruby on Rails") #=> instance of String class. But not hit...
puts check("<Ruby's world>") #=> hit! <Ruby's world>
//}
@see Object#==, Range#===, Module#===, Regexp#===, Enumerable#grep... -
BigDecimal
# ===(other) -> bool (18100.0) -
self が other と等しい場合に true を、そうでない場合に false を返します。
...self が other と等しい場合に true を、そうでない場合に false を返します。
それぞれの値は BigDecimal#coerce で変換して比較される場合があります。
//emlist[][ruby]{
require 'bigdecimal'
BigDecimal('1.0') == 1.0 # => true
//}...