種類
ライブラリ
- ビルトイン (703)
- bigdecimal (22)
-
cgi
/ html (22) - csv (11)
- etc (11)
- logger (9)
-
minitest
/ unit (1) -
net
/ http (22) - objspace (55)
- open3 (22)
- openssl (638)
- pathname (11)
- rake (220)
-
rdoc
/ context (11) - rss (363)
-
rubygems
/ dependency _ list (33) -
rubygems
/ exceptions (11) -
rubygems
/ gem _ path _ searcher (22) -
rubygems
/ installer (22) -
rubygems
/ old _ format (11) -
rubygems
/ package / tar _ input (11) -
rubygems
/ security (22) -
rubygems
/ source _ index (66) -
rubygems
/ source _ info _ cache (11) -
rubygems
/ specification (682) -
rubygems
/ uninstaller (11) - shell (36)
-
shell
/ builtin-command (36) -
shell
/ command-processor (36) -
shell
/ filter (60) - stringio (11)
- strscan (11)
-
webrick
/ httpauth / authenticator (121) -
webrick
/ httpauth / basicauth (11) -
webrick
/ https (22)
クラス
-
ARGF
. class (11) - Array (94)
- BigDecimal (22)
- Binding (6)
- CSV (11)
- Class (11)
- Encoding (11)
-
Enumerator
:: Lazy (22) - Exception (11)
- File (22)
- Float (11)
-
Gem
:: DependencyList (33) -
Gem
:: GemPathSearcher (22) -
Gem
:: Installer (22) -
Gem
:: OldFormat (11) -
Gem
:: Package :: TarInput (11) -
Gem
:: SourceIndex (66) -
Gem
:: SourceInfoCache (11) -
Gem
:: Specification (682) -
Gem
:: Uninstaller (11) - Hash (18)
- IO (11)
- Integer (4)
-
Logger
:: Application (8) - Method (11)
-
MiniTest
:: Unit (1) - Module (14)
-
Net
:: HTTP (22) - Object (11)
-
OpenSSL
:: OCSP :: BasicResponse (11) -
OpenSSL
:: OCSP :: CertificateId (44) -
OpenSSL
:: OCSP :: Request (11) -
OpenSSL
:: PKCS12 (22) -
OpenSSL
:: PKCS7 (33) -
OpenSSL
:: SSL :: SSLContext (55) -
OpenSSL
:: SSL :: SSLSocket (33) -
OpenSSL
:: X509 :: Certificate (297) -
OpenSSL
:: X509 :: ExtensionFactory (44) -
OpenSSL
:: X509 :: Store (11) -
OpenSSL
:: X509 :: StoreContext (22) - Pathname (11)
- Proc (11)
-
RDoc
:: Context (11) -
RSS
:: Maker :: ChannelBase (11) -
RSS
:: Maker :: ChannelBase :: CategoriesBase (11) -
RSS
:: Maker :: ChannelBase :: CategoriesBase :: CategoryBase (44) -
RSS
:: Maker :: ItemsBase :: ItemBase (11) -
RSS
:: Rss :: Channel (33) -
RSS
:: Rss :: Channel :: Item (33) -
RSS
:: Rss :: Channel :: Item :: Category (44) -
Rake
:: Application (132) -
Rake
:: InvocationChain (22) -
Rake
:: InvocationChain :: EmptyInvocationChain (11) -
Rake
:: Task (22) - Rational (11)
- Shell (36)
-
Shell
:: Cat (12) -
Shell
:: CommandProcessor (36) -
Shell
:: Concat (12) -
Shell
:: Filter (60) - String (19)
- StringIO (11)
- StringScanner (11)
- Thread (33)
-
Thread
:: Backtrace :: Location (77) - UnboundMethod (11)
-
WEBrick
:: HTTPAuth :: BasicAuth (11) -
WEBrick
:: HTTPRequest (22)
モジュール
-
CGI
:: HtmlExtension (22) - Comparable (11)
- Enumerable (188)
- Etc (11)
-
Gem
:: Security (22) - Kernel (47)
- ObjectSpace (55)
- Open3 (22)
-
OpenSSL
:: OCSP (11) -
OpenSSL
:: X509 (11) -
RSS
:: SyndicationModel (66) - Rake (22)
-
WEBrick
:: HTTPAuth :: Authenticator (77) -
WEBrick
:: HTTPAuth :: ProxyAuthenticator (44) - Warning (16)
キーワード
- Application (12)
- AuthException (22)
- AuthScheme (11)
- Categories (33)
- CategoriesBase (11)
- Category (44)
- CategoryBase (11)
- Certificate (11)
- CertificateError (11)
- CertificateId (11)
- Concat (6)
-
DEFAULT
_ RAKEFILES (11) - InfoField (11)
- InvalidSpecificationException (11)
- Location (11)
-
MARSHAL
_ FIELDS (11) -
REVOKED
_ STATUS _ CERTIFICATEHOLD (11) - RequestField (22)
- ResponseField (22)
- ResponseInfoField (11)
- Rubyの起動 (11)
-
SC
_ 2 _ PBS _ LOCATE (11) - SyndicationModel (11)
-
V
_ ERR _ APPLICATION _ VERIFICATION (11) - [] (5)
- []= (5)
-
_ load (11) -
absolute
_ path (11) -
add
_ bindir (11) -
add
_ certificate (11) -
add
_ dependency (11) -
add
_ development _ dependency (11) -
add
_ extension (11) -
add
_ loader (11) -
add
_ runtime _ dependency (11) - all? (39)
- allocate (11)
-
allocation
_ sourcefile (11) -
allocation
_ sourceline (11) - any? (42)
- application (22)
- application= (22)
- appname (1)
-
assign
_ defaults (11) -
attribute
_ alias _ singular (11) -
attribute
_ defaults (11) - authenticate (11)
- autorequire= (11)
-
backtrace
_ locations (33) -
base
_ label (11) - between? (11)
-
build
_ cert (11) -
ca
_ certs (11) -
caller
_ locations (22) - cat (18)
- catch (22)
-
catch
_ i (11) - categories (33)
- category (22)
- category= (22)
- cert (33)
- cert= (11)
- certid (11)
- certificate (11)
- certificates (11)
- certificates= (11)
- chain (22)
-
check
_ private _ key (11) -
client
_ ca (11) -
client
_ cert (11) -
close
_ on _ exec= (11) - cmp (11)
-
cmp
_ issuer (11) - collect (22)
-
collect
_ concat (33) - concat (67)
-
const
_ source _ location (5) - content (22)
- content= (22)
-
current
_ cert (11) - debug (11)
-
default
_ executable (11) -
default
_ executable= (11) -
default
_ value (11) -
dependency
_ order (11) -
deprecate
_ constant (9) -
development
_ dependencies (11) - domain (22)
- domain= (22)
- each (18)
- echo (18)
- email (11)
- email= (11)
- enclosure (11)
- executable (11)
- executable= (11)
- executables (11)
- executables= (11)
- extensions (11)
- extensions= (11)
-
extra
_ chain _ cert (11) -
extra
_ chain _ cert= (11) -
extra
_ rdoc _ files (11) -
extra
_ rdoc _ files= (11) -
fetch
_ values (18) -
file
_ name (11) - files (11)
- files= (11)
- find (11)
-
find
_ all (11) -
find
_ name (22) -
flat
_ map (33) - form (22)
-
from
_ installed _ gems (11) -
from
_ yaml (11) -
full
_ gem _ path (11) -
full
_ name (11) - glob (18)
-
has
_ rdoc (11) -
has
_ rdoc= (11) -
has
_ rdoc? (11) -
has
_ test _ suite? (11) -
has
_ unit _ tests? (11) - init (11)
-
inplace
_ mode (11) - inspect (11)
- install (11)
-
installation
_ path (11) -
instance
_ variable _ defined? (11) - issuer (11)
- issuer= (11)
-
issuer
_ certificate (11) -
issuer
_ certificate= (11) - label (11)
- level= (1)
-
lib
_ files (11) - lineno (11)
- list (11)
-
list
_ concat (11) -
literal
_ concat (11) -
literal
_ concat _ dstr (11) -
literal
_ concat _ list (11) -
literal
_ concat _ string (11) - load (11)
-
load
_ gemspec (11) -
load
_ rakefile (11) -
load
_ specification (11) - loaded= (11)
- loaded? (11)
-
loaded
_ from (11) -
loaded
_ from= (11) - location (1)
- log (2)
- log= (1)
- logger (11)
- map (22)
-
mark
_ locations _ array (11) - member? (22)
- name (11)
- new (57)
-
new
_ category (11) - none? (47)
- normalize (11)
-
normalize
_ yaml _ input (11) -
not
_ after (11) -
not
_ after= (11) -
not
_ before (11) -
not
_ before= (11) - one? (47)
-
original
_ dir (11) -
original
_ name (11) -
original
_ platform (11) -
original
_ platform= (11) - path (11)
-
peer
_ cert (22) -
peer
_ cert _ chain (11) -
pipeline
_ rw (22) - platform (11)
- platform= (11)
-
public
_ key (11) -
public
_ key= (11) - rakefile (11)
-
rb
_ ary _ concat (11) -
rb
_ catch (11) -
rb
_ class _ allocate _ instance (11) -
rb
_ f _ catch (11) -
rb
_ gc _ mark _ locations (11) -
rb
_ str _ cat (11) -
rb
_ str _ cat2 (11) -
rb
_ str _ concat (11) -
read
_ only (11) - realm (11)
-
record
_ location (11) -
remove
_ by _ name (11) -
remove
_ spec (11) - replicate (11)
-
required
_ attribute (11) -
required
_ attribute? (11) -
rubygems
/ commands / specification _ command (11) - run (11)
-
satisfies
_ requirement? (11) - search (22)
- serial (22)
- serial= (11)
-
server
_ cert (11) -
set
_ log (1) - shell (6)
- sign (11)
-
sign
_ cert (11) -
signature
_ algorithm (11) -
source
_ location (39) - spec (33)
- specification (11)
- start (1)
- status (11)
- subject (11)
- subject= (11)
-
subject
_ certificate (11) -
subject
_ certificate= (11) -
sy
_ updateBase (11) -
sy
_ updateBase= (11) -
sy
_ updateFrequency (11) -
sy
_ updateFrequency= (11) -
sy
_ updatePeriod (11) -
sy
_ updatePeriod= (11) - tee (18)
-
test
_ file (11) -
test
_ file= (11) -
test
_ files (11) -
test
_ files= (11) -
test
_ suite _ file (11) -
test
_ suite _ file= (11) -
thread
_ variable _ set (11) -
to
_ a (6) -
to
_ der (11) -
to
_ pem (11) -
to
_ s (28) -
to
_ text (11) -
top
_ level (11) -
top
_ level _ tasks (11) -
trace
_ object _ allocations (11) -
trace
_ object _ allocations _ start (11) -
trace
_ object _ allocations _ stop (11) - truncate (121)
-
tty
_ output= (11) - validate (11)
- verify (11)
- version (11)
- version= (11)
- warn (9)
-
yaml
_ initialize (11) - | (6)
- 制御構造 (11)
- 正規表現 (11)
検索結果
先頭5件
-
Warning
. warn(message , category: nil) -> nil (200.0) -
引数 message を標準エラー出力 $stderr に出力します。
...す。
//emlist[][ruby]{
module Warning
# 警告メッセージに category を表示し、message 末尾に !!! を追加する
def self.warn(message, category: nil)
super("#{category} warning : #{message.chomp}!!!\n")
end
end
warn("hoge", category: :deprecated)
# => deprecated warning......: hoge!!!
//}
@param message 出力するオブジェクトを指定します。
@param category 警告のカテゴリを指定します。サポートされている category については Warning.[] を参照してください。
@see Kernel.#warn, Warning#warn... -
Array
# none? -> bool (118.0) -
ブロックを指定しない場合は、 配列のすべての 要素が偽であれば真を返します。そうでなければ偽を返します。
...します。
//emlist[例][ruby]{
%w{ant bear cat}.none? {|word| word.length == 5} # => true
%w{ant bear cat}.none? {|word| word.length >= 4} # => false
%w{ant bear cat}.none?(/d/) # => true
[].none? # => true
[nil].none?......# => true
[nil,false].none? # => true
[nil, false, true].none? # => false
//}
@see Enumerable#none?... -
Array
# none? {|obj| . . . } -> bool (118.0) -
ブロックを指定しない場合は、 配列のすべての 要素が偽であれば真を返します。そうでなければ偽を返します。
...します。
//emlist[例][ruby]{
%w{ant bear cat}.none? {|word| word.length == 5} # => true
%w{ant bear cat}.none? {|word| word.length >= 4} # => false
%w{ant bear cat}.none?(/d/) # => true
[].none? # => true
[nil].none?......# => true
[nil,false].none? # => true
[nil, false, true].none? # => false
//}
@see Enumerable#none?... -
Array
# none?(pattern) -> bool (118.0) -
ブロックを指定しない場合は、 配列のすべての 要素が偽であれば真を返します。そうでなければ偽を返します。
...します。
//emlist[例][ruby]{
%w{ant bear cat}.none? {|word| word.length == 5} # => true
%w{ant bear cat}.none? {|word| word.length >= 4} # => false
%w{ant bear cat}.none?(/d/) # => true
[].none? # => true
[nil].none?......# => true
[nil,false].none? # => true
[nil, false, true].none? # => false
//}
@see Enumerable#none?... -
Array
# one? -> bool (118.0) -
ブロックを指定しない場合は、 配列の要素のうち ちょうど一つだけが真であれば、真を返します。 そうでなければ偽を返します。
...す。
//emlist[例][ruby]{
%w{ant bear cat}.one? {|word| word.length == 4} # => true
%w{ant bear cat}.one? {|word| word.length > 4} # => false
%w{ant bear cat}.one?(/t/) # => false
[ nil, true, 99 ].one? # => false
[ nil, true, false ].one?......# => true
[ nil, true, 99 ].one?(Integer) # => true
[].one? # => false
//}
@see Enumerable#one?... -
Array
# one? {|obj| . . . } -> bool (118.0) -
ブロックを指定しない場合は、 配列の要素のうち ちょうど一つだけが真であれば、真を返します。 そうでなければ偽を返します。
...す。
//emlist[例][ruby]{
%w{ant bear cat}.one? {|word| word.length == 4} # => true
%w{ant bear cat}.one? {|word| word.length > 4} # => false
%w{ant bear cat}.one?(/t/) # => false
[ nil, true, 99 ].one? # => false
[ nil, true, false ].one?......# => true
[ nil, true, 99 ].one?(Integer) # => true
[].one? # => false
//}
@see Enumerable#one?... -
Array
# one?(pattern) -> bool (118.0) -
ブロックを指定しない場合は、 配列の要素のうち ちょうど一つだけが真であれば、真を返します。 そうでなければ偽を返します。
...す。
//emlist[例][ruby]{
%w{ant bear cat}.one? {|word| word.length == 4} # => true
%w{ant bear cat}.one? {|word| word.length > 4} # => false
%w{ant bear cat}.one?(/t/) # => false
[ nil, true, 99 ].one? # => false
[ nil, true, false ].one?......# => true
[ nil, true, 99 ].one?(Integer) # => true
[].one? # => false
//}
@see Enumerable#one?... -
Array
# any? -> bool (106.0) -
すべての要素が偽である場合に false を返します。 真である要素があれば、ただちに true を返します。
...ての要素が偽である場合に false を返します。
真である要素があれば、ただちに true を返します。
ブロックを伴う場合は、各要素に対してブロックを評価し、すべての結果
が偽である場合に false を返します。ブロックが真......false を返します。
@param pattern ブロックの代わりに各要素に対して pattern === item を評価します。
//emlist[例][ruby]{
p [1, 2, 3].any? {|v| v > 3 } # => false
p [1, 2, 3].any? {|v| v > 1 } # => true
p [].any? {|v| v > 0 } # => false
p %w[ant bear cat].a......ny?(/d/) # => false
p [nil, true, 99].any?(Integer) # => true
p [nil, true, 99].any? # => true
p [].any? # => false
//}
@see Enumerable#any?... -
Array
# any? {|item| . . . } -> bool (106.0) -
すべての要素が偽である場合に false を返します。 真である要素があれば、ただちに true を返します。
...ての要素が偽である場合に false を返します。
真である要素があれば、ただちに true を返します。
ブロックを伴う場合は、各要素に対してブロックを評価し、すべての結果
が偽である場合に false を返します。ブロックが真......false を返します。
@param pattern ブロックの代わりに各要素に対して pattern === item を評価します。
//emlist[例][ruby]{
p [1, 2, 3].any? {|v| v > 3 } # => false
p [1, 2, 3].any? {|v| v > 1 } # => true
p [].any? {|v| v > 0 } # => false
p %w[ant bear cat].a......ny?(/d/) # => false
p [nil, true, 99].any?(Integer) # => true
p [nil, true, 99].any? # => true
p [].any? # => false
//}
@see Enumerable#any?... -
Array
# any?(pattern) -> bool (106.0) -
すべての要素が偽である場合に false を返します。 真である要素があれば、ただちに true を返します。
...ての要素が偽である場合に false を返します。
真である要素があれば、ただちに true を返します。
ブロックを伴う場合は、各要素に対してブロックを評価し、すべての結果
が偽である場合に false を返します。ブロックが真......false を返します。
@param pattern ブロックの代わりに各要素に対して pattern === item を評価します。
//emlist[例][ruby]{
p [1, 2, 3].any? {|v| v > 3 } # => false
p [1, 2, 3].any? {|v| v > 1 } # => true
p [].any? {|v| v > 0 } # => false
p %w[ant bear cat].a......ny?(/d/) # => false
p [nil, true, 99].any?(Integer) # => true
p [nil, true, 99].any? # => true
p [].any? # => false
//}
@see Enumerable#any?... -
正規表現 (30.0)
-
正規表現 * metachar * expansion * char * anychar * string * str * quantifier * capture * grouping * subexp * selector * anchor * cond * option * encoding * comment * free_format_mode * absenceop * list * specialvar * references
...string
* str
* quantifier
* capture
* grouping
* subexp
* selector
* anchor
* cond
* option
* encoding
* comment
* free_format_mode
* absenceop
* list
* specialvar
* references
正規表現(regular expression)は文字列のパターンを記述するための言語......るかどうかを判定し、
また含んでいるならばそれが文字列中のどの場所であるかを知ることができます。
//emlist[][ruby]{
/pat/
%r{pat}
//}
などの正規表現リテラルや Regexp.new などで正規表現
オブジェクトを得ることができます......か使えないことに注意してください。
//emlist[][ruby]{
# (..) に at がマッチしたのを \1 で参照し、マッチが成功している。
m = /[csh](..) [csh]\1 in/.match("The cat sat in the hat")
# => #<MatchData "cat sat in" 1:"at">
# Regexp#match でマッチしたテキ... -
Rubyの起動 (24.0)
-
Rubyの起動 * cmd_option * shebang
...います。
ruby [ option ...] [ -- ] [ programfile ] [ argument ...]
ここで、option は後述のcmd_option
のいずれかを指定します。-- は、オプション列の終りを明示するため
に使用できます。programfile は、Ruby スクリプトを記述したファイ......ルです。これを省略したり`-' を指定した場合には標準入力を Ruby ス
クリプトとみなします。
programfile が `#!' で始まるファイルである場合、特殊な解釈
が行われます。詳細は後述のshebang を参照
してください
argument に指......だけが残ります。ただし platform/Win32 では省略出来ません
(38066 参照)。
例:
//emlist{
% echo matz > /tmp/junk
% cat /tmp/junk
matz
% ruby -p -i.bak -e '$_.upcase!' /tmp/junk
% cat /tmp/junk
MATZ
% cat /tmp/junk.bak
matz
//}
: -I direc... -
debug (24.0)
-
Ruby デバッガです。Ruby スクリプトのソースコードデバッグに使用します。
...た、Emacs を使用したインタフェース rubydb3x.el が
https://github.com/ruby/elisp にあるので、活用してください。
=== 使い方
$ ruby -rdebug foo.rb
または、Emacs から
M-x load-library rubydb3x.el
M-x rubydb
=== デバッグコマンド
以下は、......ます。
ここに挙げたもの以外を入力した場合、その入力を ruby の式として評価します。
: break
: break [<file>:]<position>|<class>:<method>
ブレークポイントを設定します。引数を省略した場合設定したブレークポ
イントを表示......た場合は現在実行中のファイルを指定した
ものと見倣されます。
このコマンドの省略形は b です。
: catch <an Exception>
例外が発生した時にデバッガを停止させるキャッチポイントを設定します。
引数を省略した...