ライブラリ
- ビルトイン (80)
- bigdecimal (2)
-
cgi
/ html (2) - csv (1)
-
net
/ http (3) -
net
/ imap (2) -
net
/ smtp (1) - objspace (4)
- open3 (2)
- openssl (35)
- pathname (1)
- rake (10)
- rss (27)
-
rubygems
/ dependency _ list (2) -
rubygems
/ gem _ path _ searcher (2) -
rubygems
/ indexer (1) -
rubygems
/ installer (1) -
rubygems
/ package / tar _ input (1) -
rubygems
/ requirement (1) -
rubygems
/ security (2) -
rubygems
/ source _ index (7) -
rubygems
/ source _ info _ cache (2) -
rubygems
/ specification (59) - shell (6)
-
shell
/ builtin-command (4) -
shell
/ command-processor (6) -
shell
/ filter (8) - socket (2)
- stringio (1)
- strscan (1)
-
webrick
/ httpauth / authenticator (1) -
webrick
/ httpauth / basicauth (1) -
webrick
/ httpauth / digestauth (1) -
webrick
/ https (2)
クラス
-
ARGF
. class (1) - Array (14)
- BigDecimal (2)
- CSV (1)
- Class (1)
-
Enumerator
:: Lazy (2) - Exception (1)
- File (2)
- Float (1)
-
Gem
:: DependencyList (2) -
Gem
:: GemPathSearcher (2) -
Gem
:: Indexer (1) -
Gem
:: Installer (1) -
Gem
:: Package :: TarInput (1) -
Gem
:: Requirement (1) -
Gem
:: SourceIndex (7) -
Gem
:: SourceInfoCache (2) -
Gem
:: Specification (59) - Hash (2)
- IO (15)
- Integer (1)
- Method (1)
- Module (1)
-
Net
:: HTTP (3) -
Net
:: IMAP (2) -
Net
:: SMTP (1) - Numeric (1)
- Object (1)
-
OpenSSL
:: OCSP :: BasicResponse (1) -
OpenSSL
:: OCSP :: CertificateId (4) -
OpenSSL
:: OCSP :: Request (1) -
OpenSSL
:: PKCS7 (2) -
OpenSSL
:: SSL :: SSLContext (5) -
OpenSSL
:: SSL :: SSLSocket (3) -
OpenSSL
:: X509 :: Certificate (16) -
OpenSSL
:: X509 :: ExtensionFactory (2) - Pathname (1)
- Proc (1)
-
RSS
:: Maker :: ChannelBase (1) -
RSS
:: Maker :: ChannelBase :: CategoriesBase (1) -
RSS
:: Maker :: ChannelBase :: CategoriesBase :: CategoryBase (4) -
RSS
:: Maker :: ItemsBase :: ItemBase (4) -
RSS
:: Maker :: RSS20 :: Items :: Item :: Categories (1) -
RSS
:: Rss :: Channel (3) -
RSS
:: Rss :: Channel :: Item (3) -
RSS
:: Rss :: Channel :: Item :: Category (4) -
Rake
:: Application (2) -
Rake
:: InvocationChain (4) -
Rake
:: InvocationChain :: EmptyInvocationChain (1) -
Rake
:: Task (1) - Rational (1)
- Shell (6)
-
Shell
:: Cat (2) -
Shell
:: CommandProcessor (6) -
Shell
:: Concat (2) -
Shell
:: Filter (8) - Socket (1)
- String (2)
- StringIO (1)
- StringScanner (1)
- Thread (3)
-
Thread
:: Backtrace :: Location (6) - UnboundMethod (1)
-
WEBrick
:: HTTPAuth :: BasicAuth (1) -
WEBrick
:: HTTPAuth :: DigestAuth (1) -
WEBrick
:: HTTPRequest (2)
モジュール
-
CGI
:: HtmlExtension (2) - Comparable (1)
- Enumerable (16)
-
Gem
:: Security (2) - Kernel (4)
- ObjectSpace (4)
- Open3 (2)
-
OpenSSL
:: X509 (1) -
RSS
:: SyndicationModel (6) - Rake (2)
-
Socket
:: Constants (1) -
WEBrick
:: HTTPAuth :: Authenticator (1)
キーワード
- Location (1)
-
MARSHAL
_ FIELDS (1) -
SO
_ SECURITY _ AUTHENTICATION (2) -
V
_ ERR _ APPLICATION _ VERIFICATION (1) -
_ dump (1) -
_ load (1) - abbreviate (1)
-
absolute
_ path (1) -
add
_ authenticator (1) -
add
_ bindir (1) -
add
_ certificate (1) -
add
_ dependency (1) -
add
_ development _ dependency (1) -
add
_ extension (1) -
add
_ loader (1) -
add
_ runtime _ dependency (1) -
add
_ spec (1) - all? (6)
- allocate (1)
-
allocation
_ sourcefile (1) -
allocation
_ sourceline (1) - any? (6)
- append (3)
- application (1)
- application= (2)
-
array
_ attribute (1) -
array
_ attributes (1) -
attribute
_ alias _ singular (1) -
attribute
_ defaults (1) - attributes (1)
- authenticate (4)
-
backtrace
_ locations (3) -
base
_ label (1) - between? (1)
- bindir= (1)
-
build
_ cert (1) -
caller
_ locations (2) - catch (2)
- categories (4)
- category (2)
- category= (2)
- cert (3)
- cert= (2)
-
cert
_ chain (1) -
cert
_ chain= (1) - certid (1)
- certificates= (1)
-
check
_ private _ key (1) -
client
_ ca (1) -
client
_ cert (1) -
close
_ on _ exec= (1) - cmp (1)
-
cmp
_ issuer (1) - collect (2)
-
collect
_ concat (1) - concat (9)
- content (2)
- content= (2)
- date= (1)
-
default
_ executable= (1) -
default
_ value (1) - dependencies (1)
-
deprecate
_ constant (1) - description= (1)
- domain (2)
- domain= (2)
- each (3)
- echo (3)
- email= (1)
- enclosure (1)
- executable= (1)
- executables= (1)
- extensions= (2)
-
extra
_ chain _ cert (1) -
extra
_ chain _ cert= (1) -
extra
_ rdoc _ files= (1) -
fetch
_ values (2) - files= (1)
- find (1)
-
find
_ all (1) -
find
_ name (2) -
flat
_ map (1) - form (2)
-
from
_ installed _ gems (1) -
from
_ yaml (1) - glob (3)
- guid (1)
-
has
_ rdoc? (1) - homepage= (1)
-
inplace
_ mode (1) - inspect (1)
- install (1)
-
instance
_ variable _ defined? (1) - issuer= (1)
-
issuer
_ certificate= (1) - label (1)
- load (1)
-
load
_ gemspec (1) -
load
_ specification (1) - loaded= (1)
-
loaded
_ from= (1) - map (2)
- member? (1)
- name= (1)
- new (7)
-
new
_ category (2) - none? (6)
-
normalize
_ yaml _ input (1) -
not
_ after= (1) -
not
_ before= (1) - one? (6)
-
original
_ name (1) -
original
_ platform= (1) -
overwrite
_ accessor (1) - path (1)
-
peer
_ cert (2) -
peer
_ cert _ chain (1) -
pipeline
_ rw (2) - platform= (1)
- popen (14)
-
public
_ key (1) -
public
_ key= (1) -
read
_ only (1) -
remove
_ by _ name (1) -
require
_ path (1) -
require
_ path= (1) -
require
_ paths= (1) -
required
_ attribute (1) -
required
_ attribute? (1) -
required
_ ruby _ version= (1) -
required
_ rubygems _ version= (1) - requirements= (1)
-
ruby 1
. 6 feature (1) -
ruby 1
. 8 . 3 feature (1) -
rubygems
_ version= (1) -
satisfies
_ requirement? (1) - search (3)
- serial (2)
- serial= (1)
-
server
_ cert (1) - sign (1)
-
sign
_ cert (1) -
signing
_ key= (1) - source (1)
-
source
_ location (3) - specification (1)
-
specification
_ version= (1) - status (1)
- subject= (1)
-
subject
_ certificate= (1) - summary= (1)
-
sy
_ updateBase (1) -
sy
_ updateBase= (1) -
sy
_ updateFrequency (1) -
sy
_ updateFrequency= (1) -
sy
_ updatePeriod (1) -
sy
_ updatePeriod= (1) - tee (3)
-
test
_ files= (1) -
test
_ suite _ file= (1) -
thread
_ variable _ set (1) -
to
_ s (1) -
trace
_ object _ allocations _ start (1) -
trace
_ object _ allocations _ stop (1) - truncate (14)
- tsort (1)
-
tty
_ output= (1) - userdb (1)
- validate (1)
- verify (1)
- version= (2)
-
yaml
_ initialize (1) - | (1)
検索結果
先頭5件
-
Shell
# cat(*files) -> Shell :: Filter (54358.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
実行すると, それらを内容とする Filter オブジェクトを返します.
@param files シェルコマンド cat に与えるファイル名を文字列で指定します。
動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "al... -
Shell
:: CommandProcessor # cat(*files) -> Shell :: Filter (54358.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
実行すると, それらを内容とする Filter オブジェクトを返します.
@param files シェルコマンド cat に与えるファイル名を文字列で指定します。
動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "al... -
Shell
:: Filter # cat(*files) -> Shell :: Filter (54358.0) -
実行すると, それらを内容とする Filter オブジェクトを返します.
実行すると, それらを内容とする Filter オブジェクトを返します.
@param files シェルコマンド cat に与えるファイル名を文字列で指定します。
動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "al... -
OpenSSL
:: X509 :: V _ ERR _ APPLICATION _ VERIFICATION -> Integer (36619.0) -
アプリケーションが利用するエラーコードです。
アプリケーションが利用するエラーコードです。
OpenSSL のライブラリでは使われないので、
アプリケーションプログラマが自由に利用することが可能です。
OpenSSL::X509::Store#error や
OpenSSL::X509::StoreContext#error のエラーコードとして
使われます。
@see OpenSSL::X509::Store#verify_callback=,
OpenSSL::X509::StoreContext#error= -
RSS
:: Maker :: ChannelBase :: CategoriesBase # new _ category (27349.0) -
@todo 新しくcategoryを作成し,返します.作成された categoryはcategoryリストの最後 に追加されています.
@todo
新しくcategoryを作成し,返します.作成された
categoryはcategoryリストの最後
に追加されています. -
RSS
:: Maker :: RSS20 :: Items :: Item :: Categories # new _ category (27349.0) -
@todo 新しくcategoryを作成し,返します.作成された categoryはcategoryリストの最後 に追加されています.
@todo
新しくcategoryを作成し,返します.作成された
categoryはcategoryリストの最後
に追加されています.
item.categories.new_categoryが作成する
categoryは
maker.channel.categories.new_categoryが作成する
categoryと同じAPIを持ちます. -
Gem
:: Specification # specification _ version=(version) (27337.0) -
この Gem パッケージに用いられている gemspec のバージョンをセットします。
この Gem パッケージに用いられている gemspec のバージョンをセットします。
@param version gemspec のバージョンを指定します。
@see Gem::Specification::SPECIFICATION_VERSION_HISTORY -
Rake
. application -> Rake :: Application (18889.0) -
現在の Rake アプリケーションを返します。
現在の Rake アプリケーションを返します。
//emlist[][ruby]{
# Rakefile での記載例とする
require 'pp'
task default: :test_rake_app
task :test_rake_app do
pp Rake.application
end
# => #<Rake::Application:0x31b0f18
# @default_loader=#<Rake::DefaultLoader:0x31b0c78>,
# @imported=[],
# @last_description=nil,
# ... -
Kernel
. # caller _ locations(range) -> [Thread :: Backtrace :: Location] | nil (18673.0) -
現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。
現在のフレームを Thread::Backtrace::Location の配列で返します。引
数で指定した値が範囲外の場合は nil を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフレームの個数を指定します。
@param range 取得したいフレームの範囲を示す Range オブジェクトを指定します。
//emlist[例][ruby]{
def test1(start, length)
locations = caller_locations(start, length)
p locations
... -
Kernel
. # caller _ locations(start = 1 , length = nil) -> [Thread :: Backtrace :: Location] | nil (18673.0) -
現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。
現在のフレームを Thread::Backtrace::Location の配列で返します。引
数で指定した値が範囲外の場合は nil を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフレームの個数を指定します。
@param range 取得したいフレームの範囲を示す Range オブジェクトを指定します。
//emlist[例][ruby]{
def test1(start, length)
locations = caller_locations(start, length)
p locations
... -
Thread
# backtrace _ locations(range) -> [Thread :: Backtrace :: Location] | nil (18673.0) -
スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。
スレッドの現在のバックトレースを Thread::Backtrace::Location の配
列で返します。
引数で指定した値が範囲外の場合、スレッドがすでに終了している場合は nil
を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフレームの個数を指定します。
@param range 取得したいフレームの範囲を示す Range オブジェクトを指定します。
Kernel.#caller_locations と似ていますが、本メソッドは self に限定
した情報を返します。
//emlist[例][ruby]... -
Thread
# backtrace _ locations(start = 0 , length = nil) -> [Thread :: Backtrace :: Location] | nil (18673.0) -
スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。
スレッドの現在のバックトレースを Thread::Backtrace::Location の配
列で返します。
引数で指定した値が範囲外の場合、スレッドがすでに終了している場合は nil
を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフレームの個数を指定します。
@param range 取得したいフレームの範囲を示す Range オブジェクトを指定します。
Kernel.#caller_locations と似ていますが、本メソッドは self に限定
した情報を返します。
//emlist[例][ruby]... -
Gem
:: SourceIndex . load _ specification(file _ name) -> Gem :: Specification | nil (18655.0) -
与えられたファイル名から Ruby スクリプト形式の gemspec をロードして Gem::Specification のインスタンスを返します。
与えられたファイル名から Ruby スクリプト形式の gemspec をロードして
Gem::Specification のインスタンスを返します。
@param file_name ファイル名を指定します。
@raise SignalException gemspec をロードしているときに発生します。
@raise SystemExit gemspec をロードしているときに発生します。 -
Shell
# concat(*jobs) -> Shell :: Concat (18649.0) -
@todo
@todo -
Shell
:: CommandProcessor # concat(*jobs) -> Shell :: Concat (18649.0) -
@todo
@todo -
Shell
:: Filter # concat(*jobs) -> Shell :: Concat (18649.0) -
@todo
@todo -
Net
:: IMAP . add _ authenticator(auth _ type , authenticator) -> () (18637.0) -
Net::IMAP#authenticate で使う 認証用クラスを設定します。
Net::IMAP#authenticate で使う
認証用クラスを設定します。
imap ライブラリに新たな認証方式を追加するために用います。
通常は使う必要はないでしょう。もしこれを用いて
認証方式を追加する場合は net/imap.rb の
Net::IMAP::LoginAuthenticator などを参考にしてください。
@param auth_type 認証の種類(文字列)
@param authenticator 認証クラス(Class オブジェクト) -
OpenSSL
:: PKCS7 # certificates=(certificates) (18637.0) -
署名に付ける証明書を指定します。
署名に付ける証明書を指定します。
PKCS7 オブジェクトに元々つけられていた証明書はクリアされます。
通常は OpenSSL::PKCS7.sign の引数で添付する証明書を指定した
ほうがよいでしょう。
@param certificates 証明書(OpenSSL::X509::Certificate オブジェクト)の配列
@raise OpenSSL::PKCS7::PKCS7Error 変更に失敗した場合に発生します。 -
Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] (18619.0) -
バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。
バックトレース情報を返します。Exception#backtraceに似ていますが、
Thread::Backtrace::Location の配列を返す点が異なります。
現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。
//emlist[例: test.rb][ruby]{
require "date"
def check_long_month(month)
return if Date.new(2000, month, -1).day == 31
raise "#{month} is not long month"
end
... -
Gem
:: SourceIndex # specification(full _ name) -> Gem :: Specification | nil (18619.0) -
指定された名前の Gem::Specification オブジェクトを返します。
指定された名前の Gem::Specification オブジェクトを返します。
@param full_name Gem のフルネームを指定します。 -
Rake
. application=(app) (18607.0) -
現在の Rake アプリケーションをセットします。
現在の Rake アプリケーションをセットします。
@param app Rake::Application のインスタンスを指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
require 'pp'
task default: :test_rake_app
task :test_rake_app do
app = Rake::Application.new
app.tty_output = true
Rake.application = app
pp Rake.application
end
# => #<Rake::App... -
Net
:: IMAP # authenticate(auth _ type , user , password) -> Net :: IMAP :: TaggedResponse (18373.0) -
AUTHENTICATE コマンドを送り、クライアントを認証します。
AUTHENTICATE コマンドを送り、クライアントを認証します。
auth_type で利用する認証方式を文字列で指定します。
例:
imap.authenticate('LOGIN', user, password)
auth_type としては以下がサポートされています。
* "LOGIN"
* "PLAIN"
* "CRAM-MD5"
* "DIGEST-MD5"
@param auth_type 認証方式を表す文字列
@param user ユーザ名文字列
@param password パスワード文字列
@see Net::IMAP#login -
Net
:: SMTP # authenticate(user , secret , authtype) -> () (18373.0) -
認証を行います。
認証を行います。
このメソッドはセッション開始(Net::SMTP#start)後、
メールを送る前に呼びだしてください。
通常は Net::SMTP.start や Net::SMTP#start で認証を
行うためこれを利用する必要はないはずです。
@param user 認証で使うアカウント名
@param secret 認証で使うパスワード
@param authtype 認証の種類(:plain, :login, :cram_md5 のいずれか)
@see Net::SMTP.start, Net::SMTP#start, Net::SMTP#auth_plain, Net:... -
File
. truncate(path , length) -> 0 (18355.0) -
path で指定されたファイルのサイズを最大 length バイト にします。
path で指定されたファイルのサイズを最大 length バイト
にします。
サイズの変更に成功すれば 0 を返します。失敗した場合は例外
Errno::EXXX が発生します。
@param path パスを表す文字列を指定します。
@param length 変更したいサイズを整数で与えます。
@raise Errno::EXXX 失敗した場合に発生します。
//emlist[例][ruby]{
IO.write("testfile", "1234567890")
File.truncate("testfile", 5) # => 0
File.size("testfil... -
Kernel
. # catch {|tag| . . . . } -> object (18355.0) -
Kernel.#throwとの組み合わせで大域脱出を行います。 catch はブロックを実行します。
Kernel.#throwとの組み合わせで大域脱出を行います。 catch はブロックを実行します。
ブロックの実行中に tag と同一のオブジェクトを引数とする Kernel.#throw が行われた
場合は、その throw の第二引数を戻り値として、ブロックの実行を終了します。
主にネストしたループから一気に脱出するのに使用します。
引数を省略した場合、タグとなるオブジェクトが内部で生成され、ブロックパラメータ tag に
渡されます。
@param tag タグとなる任意のオブジェクトです。
@return ブロックの返り値か、対応するthrowの第二引数を返り値として返しま... -
Kernel
. # catch(tag) {|tag| . . . . } -> object (18355.0) -
Kernel.#throwとの組み合わせで大域脱出を行います。 catch はブロックを実行します。
Kernel.#throwとの組み合わせで大域脱出を行います。 catch はブロックを実行します。
ブロックの実行中に tag と同一のオブジェクトを引数とする Kernel.#throw が行われた
場合は、その throw の第二引数を戻り値として、ブロックの実行を終了します。
主にネストしたループから一気に脱出するのに使用します。
引数を省略した場合、タグとなるオブジェクトが内部で生成され、ブロックパラメータ tag に
渡されます。
@param tag タグとなる任意のオブジェクトです。
@return ブロックの返り値か、対応するthrowの第二引数を返り値として返しま... -
Module
# deprecate _ constant(*name) -> self (18355.0) -
name で指定した定数を deprecate に設定します。 deprecate に設定した定数を参照すると警告メッセージが表示されます。
name で指定した定数を deprecate に設定します。
deprecate に設定した定数を参照すると警告メッセージが表示されます。
@param name 0 個以上の String か Symbol を指定します。
@raise NameError 存在しない定数を指定した場合に発生します。
@return self を返します。
//emlist[例][ruby]{
FOO = 123
Object.deprecate_constant(:FOO) # => Object
FOO
# warning: constant ::FOO is deprecated
# =... -
ObjectSpace
. # allocation _ sourcefile(object) -> String (18355.0) -
objectの元となったソースファイル名を返します。
objectの元となったソースファイル名を返します。
@param object 元となるソースファイル名を取得したいobjectを指定します。
@return objectの元となるソースファイル名を返します。存在しない場合はnilを返します。
//emlist[例:test.rbというファイルで下記のスクリプトを実行した場合][ruby]{
require 'objspace'
ObjectSpace::trace_object_allocations_start
obj = Object.new
puts "file:#{ObjectSpace::allocation_sourc... -
ObjectSpace
. # allocation _ sourceline(object) -> Integer (18355.0) -
objectの元となったソースファイルの行番号を返します。
objectの元となったソースファイルの行番号を返します。
@param object 元となるソースファイルの行番号を取得したいobjectを指定します。
@return objectの元となるソースファイルの行番号を返します。存在しない場合はnilを返します。
//emlist[例][ruby]{
require 'objspace'
ObjectSpace::trace_object_allocations_start
obj = Object.new
puts "line:#{ObjectSpace::allocation_sourceline(obj)}" # => lin... -
Shell
# truncate(path , length) -> 0 (18355.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param path パスを表す文字列を指定します。
@param length 変更したいサイズを整数で与えます。
@see File.truncate -
Shell
:: CommandProcessor # truncate(path , length) -> 0 (18355.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param path パスを表す文字列を指定します。
@param length 変更したいサイズを整数で与えます。
@see File.truncate -
Shell
:: Filter # truncate(path , length) -> 0 (18355.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param path パスを表す文字列を指定します。
@param length 変更したいサイズを整数で与えます。
@see File.truncate -
StringIO
# truncate(len) -> Integer (18355.0) -
自身のサイズが len になるように、自身を切り詰め、もしくは拡大します。 拡大した場合は、その部分を 0 で埋めます。 len を返します。
自身のサイズが len になるように、自身を切り詰め、もしくは拡大します。
拡大した場合は、その部分を 0 で埋めます。
len を返します。
@param len 変更したいサイズを整数で指定します。
@raise IOError 自身が書き込み可能でない時に発生します。
@raise Errno::EINVAL len がマイナスの時に発生します。
//emlist[例][ruby]{
require "stringio"
a = StringIO.new("hoge", 'r+')
a.truncate(2)
a.string #=>... -
WEBrick
:: HTTPAuth :: BasicAuth # authenticate(request , response) -> bool (18355.0) -
クライアントから送られてきたユーザ名とパスワードを認証します。 認証に失敗した場合は challenge を呼びます。
クライアントから送られてきたユーザ名とパスワードを認証します。
認証に失敗した場合は challenge を呼びます。
@param request WEBrick::HTTPRequest のインスタンスを指定します。
@param response WEBrick::HTTPResponse のインスタンスを指定します。
@raise WEBrick::HTTPStatus::Unauthorized 認証に失敗した場合に発生します。 -
WEBrick
:: HTTPAuth :: DigestAuth # authenticate(request , response) -> true (18355.0) -
クライアントから送られてきたユーザ名とパスワードを認証します。 認証に失敗した場合は challenge を呼びます。
クライアントから送られてきたユーザ名とパスワードを認証します。
認証に失敗した場合は challenge を呼びます。
@param request WEBrick::HTTPRequest のインスタンスを指定します。
@param response WEBrick::HTTPResponse のインスタンスを指定します。
@raise WEBrick::HTTPStatus::Unauthorized 認証に失敗した場合に発生します。 -
RSS
:: Maker :: ChannelBase # categories (18349.0) -
@todo categoriesを返します.
@todo
categoriesを返します. -
RSS
:: Maker :: ItemsBase :: ItemBase # categories (18349.0) -
@todo
@todo -
RSS
:: Rss :: Channel # categories (18349.0) -
@todo
@todo -
RSS
:: Rss :: Channel # category (18349.0) -
@todo
@todo -
RSS
:: Rss :: Channel # category= (18349.0) -
@todo
@todo -
RSS
:: Rss :: Channel :: Item # categories (18349.0) -
@todo
@todo -
RSS
:: Rss :: Channel :: Item # category (18349.0) -
@todo
@todo -
RSS
:: Rss :: Channel :: Item # category= (18349.0) -
@todo
@todo -
Socket
:: Constants :: SO _ SECURITY _ AUTHENTICATION -> Integer (18349.0) -
@todo
@todo -
Socket
:: SO _ SECURITY _ AUTHENTICATION -> Integer (18349.0) -
@todo
@todo -
Array
# concat(*other _ arrays) -> self (18340.0) -
other_arrays の要素を自身の末尾に破壊的に連結します。
other_arrays の要素を自身の末尾に破壊的に連結します。
@param other_arrays 自身と連結したい配列を指定します。
//emlist[例][ruby]{
[ "a", "b" ].concat( ["c", "d"] ) #=> [ "a", "b", "c", "d" ]
[ "a" ].concat( ["b"], ["c", "d"] ) #=> [ "a", "b", "c", "d" ]
[ "a" ].concat #=> [ "a" ]
a = [ 1, 2, 3 ]
a.concat( [ 4, 5 ] )
a ... -
Class
# allocate -> object (18337.0) -
自身のインスタンスを生成して返します。生成したオブジェクトは 自身のインスタンスであること以外には何も特性を持ちません。
自身のインスタンスを生成して返します。生成したオブジェクトは
自身のインスタンスであること以外には何も特性を持ちません。
//emlist[例][ruby]{
klass = Class.new do
def initialize(*args)
@initialized = true
end
def initialized?
@initialized || false
end
end
klass.allocate.initialized? #=> false
//} -
Enumerator
:: Lazy # collect _ concat {|item| . . . } -> Enumerator :: Lazy (18337.0) -
ブロックの実行結果をひとつに繋げたものに対してイテレートするような Enumerator::Lazy のインスタンスを返します。
ブロックの実行結果をひとつに繋げたものに対してイテレートするような
Enumerator::Lazy のインスタンスを返します。
//emlist[][ruby]{
["foo", "bar"].lazy.flat_map {|i| i.each_char.lazy}.force
#=> ["f", "o", "o", "b", "a", "r"]
//}
ブロックの返した値 x は、以下の場合にのみ分解され、連結されます。
* x が配列であるか、to_ary メソッドを持つとき
* x が each および force メソッドを持つ (例:Enumerator::Lazy) ... -
File
# truncate(length) -> 0 (18337.0) -
ファイルのサイズを最大 length バイトにします。
ファイルのサイズを最大 length バイトにします。
サイズの変更に成功すれば 0 を返します。失敗した場合は例外
Errno::EXXX が発生します。
@raise IOError 自身が書き込み用にオープンされていなければ発生します。
@raise Errno::EXXX サイズの変更に失敗した場合に発生します。
//emlist[例][ruby]{
IO.write("testfile", "1234567890")
File.open("testfile", "a") do |f|
f.truncate(5) # => 0
f.size # => 5... -
Integer
# truncate(ndigits = 0) -> Integer (18337.0) -
0 から self までの整数で、自身にもっとも近い整数を返します。
0 から self までの整数で、自身にもっとも近い整数を返します。
@param ndigits 10進数での小数点以下の有効桁数を整数で指定します。
負の整数を指定した場合、小数点位置から左に少なくとも n 個の 0 が並びます。
//emlist[][ruby]{
1.truncate # => 1
1.truncate(2) # => 1
18.truncate(-1) # => 10
(-18).truncate(-1) # => -10
//}
@see Numeric#truncate -
OpenSSL
:: PKCS7 # add _ certificate(cert) -> self (18337.0) -
署名に添付する証明書を追加します。
署名に添付する証明書を追加します。
通常は OpenSSL::PKCS7.sign の引数で添付する証明書を指定した
ほうがよいでしょう。
@param cert 追加する証明書(OpenSSL::X509::Certificate オブジェクト)
@raise OpenSSL::PKCS7::PKCS7Error 追加に失敗した場合に発生します。 -
OpenSSL
:: X509 :: ExtensionFactory # issuer _ certificate=(cert) (18337.0) -
自身に発行者(issuer)の証明書オブジェクトを設定します。
自身に発行者(issuer)の証明書オブジェクトを設定します。
@param cert 設定する証明書(OpenSSL::X509::Certificate)オブジェクト
@see OpenSSL::X509::ExtensionFactory.new -
OpenSSL
:: X509 :: ExtensionFactory # subject _ certificate=(name) (18337.0) -
自身に所有者(subject)の証明書オブジェクトを設定します。
自身に所有者(subject)の証明書オブジェクトを設定します。
@param cert 設定する証明書(OpenSSL::X509::Certificate)オブジェクト
@see OpenSSL::X509::ExtensionFactory.new -
Pathname
# truncate(length) -> 0 (18337.0) -
File.truncate(self.to_s, length) と同じです。
File.truncate(self.to_s, length) と同じです。
@param length 変更したいサイズを整数で与えます。
@see File.truncate -
Array
# concat(other) -> self (18325.0) -
配列 other を自身の末尾に破壊的に連結します。
配列 other を自身の末尾に破壊的に連結します。
@param other 自身と連結したい配列を指定します。
//emlist[例][ruby]{
array = [1, 2]
a = [3, 4]
array.concat a
p array # => [1, 2, 3, 4]
p a # => [3, 4] # こちらは変わらない
//} -
BigDecimal
# truncate -> Integer (18319.0) -
小数点以下の数を切り捨てて整数にします。
小数点以下の数を切り捨てて整数にします。
@param n 小数点以下の桁数を整数で指定します。
以下のように引数を与えて、小数点以下 n+1 位の数字を操作することもできます。
n が正の時は、小数点以下 n+1 位の数字を切り捨てます
(小数点以下を、最大 n 桁にします)。
n が負のときは小数点以上 n 桁目を操作します
(小数点位置から左に少なくとも n 個の 0 が並びます)。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("1.23456").truncate(4).to_f # => 1.2345
BigDec... -
BigDecimal
# truncate(n) -> BigDecimal (18319.0) -
小数点以下の数を切り捨てて整数にします。
小数点以下の数を切り捨てて整数にします。
@param n 小数点以下の桁数を整数で指定します。
以下のように引数を与えて、小数点以下 n+1 位の数字を操作することもできます。
n が正の時は、小数点以下 n+1 位の数字を切り捨てます
(小数点以下を、最大 n 桁にします)。
n が負のときは小数点以上 n 桁目を操作します
(小数点位置から左に少なくとも n 個の 0 が並びます)。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("1.23456").truncate(4).to_f # => 1.2345
BigDec... -
CSV
# truncate(path , length) -> 0 (18319.0) -
File#truncate に委譲します。
File#truncate に委譲します。
@see File#truncate -
Gem
:: Requirement # concat(requirements) -> Array (18319.0) -
新しい条件(配列)を自身の条件に破壊的に加えます。
新しい条件(配列)を自身の条件に破壊的に加えます。
@param requirements 条件の配列を指定します。
//emlist[][ruby]{
req = Gem::Requirement.new("< 5.0")
req.concat(["= 1.9"])
puts req # => < 5.0, = 1.9
//} -
Method
# source _ location -> [String , Integer] | nil (18319.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... -
Numeric
# truncate -> Integer (18319.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 -
ObjectSpace
. # trace _ object _ allocations _ start -> nil (18319.0) -
オブジェクト割り当てのトレースを開始します。
オブジェクト割り当てのトレースを開始します。
@see ObjectSpace.#trace_object_allocations_stop -
ObjectSpace
. # trace _ object _ allocations _ stop -> nil (18319.0) -
オブジェクト割り当てのトレースを終了します。
オブジェクト割り当てのトレースを終了します。
トレースを終了する為には、ObjectSpace.#trace_object_allocations_startを呼んだ回数分だけこのメソッドを呼ぶ必要があります。
@see ObjectSpace.#trace_object_allocations_start -
Proc
# source _ location -> [String , Integer] | nil (18319.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 # => ... -
Rake
:: InvocationChain :: EmptyInvocationChain # append(task _ name) -> Rake :: InvocationChain (18319.0) -
与えられた値を追加した Rake::InvocationChain を返します。
与えられた値を追加した Rake::InvocationChain を返します。
@param task_name 追加する値を指定します。 -
Rake
:: Task # application=(app) (18319.0) -
自身を所有している Rake::Application のインスタンスをセットします。
自身を所有している Rake::Application のインスタンスをセットします。
@param app 自身を所有しているアプリケーションを指定します。 -
UnboundMethod
# source _ location -> [String , Integer] | nil (18319.0) -
ソースコードのファイル名と行番号を配列で返します。
ソースコードのファイル名と行番号を配列で返します。
その手続オブジェクトが ruby で定義されていない(つまりネイティブ
である)場合は nil を返します。
//emlist[例][ruby]{
require 'time'
Time.instance_method(:zone).source_location # => nil
Time.instance_method(:httpdate).source_location # => ["/Users/user/.rbenv/versions/2.4.3/lib/ruby/2.4.0/time.rb", 654]
/... -
RSS
:: Maker :: ChannelBase :: CategoriesBase :: CategoryBase # content (18049.0) -
@todo
@todo -
RSS
:: Maker :: ChannelBase :: CategoriesBase :: CategoryBase # content=() (18049.0) -
@todo
@todo -
RSS
:: Maker :: ChannelBase :: CategoriesBase :: CategoryBase # domain (18049.0) -
@todo
@todo -
RSS
:: Maker :: ChannelBase :: CategoriesBase :: CategoryBase # domain=() (18049.0) -
@todo
@todo -
Thread
:: Backtrace :: Location (18019.0) -
Ruby のフレームを表すクラスです。
Ruby のフレームを表すクラスです。
Kernel.#caller_locations から生成されます。
//emlist[例1][ruby]{
# caller_locations.rb
def a(skip)
caller_locations(skip)
end
def b(skip)
a(skip)
end
def c(skip)
b(skip)
end
c(0..2).map do |call|
puts call.to_s
end
//}
例1の実行結果:
caller_locations.rb:2:in `a'
caller_locations... -
StringScanner
# concat(str) -> self (9391.0) -
操作対象の文字列に対し str を破壊的に連結します。 マッチ記録は変更されません。
操作対象の文字列に対し str を破壊的に連結します。
マッチ記録は変更されません。
selfを返します。
@param str 操作対象の文字列に対し str を破壊的に連結します。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test') # => #<StringScanner 0/4 @ "test">
s.scan(/\w(\w*)/) # => "test"
s[0] # => "test"
s[1] ... -
OpenSSL
:: OCSP :: CertificateId . new(subject , issuer , digest=nil) -> OpenSSL :: OCSP :: CertificateId (9373.0) -
CertificateId オブジェクトを生成します。
CertificateId オブジェクトを生成します。
subject には問合せ対象の証明書を、issuerにはsubjectのissuer(発行者)
の証明書を渡します。
@param subject 問合せ対象の証明書(OpenSSL::X509::Certificate オブジェクト)
@param issuer subjectのissuer(発行者)の証明書(OpenSSL::X509::Certificate オブジェクト)
@param digest issuerの名前のハッシュ値、issuerの証明書の公開鍵のハッシュ値を取るためのハッシュアルゴリズム。nilでデフォルトの... -
Rational
# truncate(precision = 0) -> Rational | Integer (9355.0) -
小数点以下を切り捨てて値を整数に変換します。
小数点以下を切り捨てて値を整数に変換します。
@param precision 計算結果の精度
@raise TypeError precision に整数以外のものを指定すると発生します。
//emlist[例][ruby]{
Rational(2, 3).to_i # => 0
Rational(3).to_i # => 3
Rational(300.6).to_i # => 300
Rational(98, 71).to_i # => 1
Rational(-31, 2).to_i # => -15
//}
precision を指定した場合は指定した桁数で切り... -
Float
# truncate(ndigits = 0) -> Integer | Float (9337.0) -
小数点以下を切り捨てて値を整数に変換します。
小数点以下を切り捨てて値を整数に変換します。
@param ndigits 10進数での小数点以下の有効桁数を整数で指定します。
正の整数を指定した場合、Float を返します。
小数点以下を、最大 n 桁にします。
負の整数を指定した場合、Integer を返します。
小数点位置から左に少なくとも n 個の 0 が並びます。
//emlist[例][ruby]{
2.8.truncate # => 2
(-2.8).truncate ... -
Gem
:: Specification . load(filename) -> Gem :: Specification (9337.0) -
gemspec ファイルをロードします。
gemspec ファイルをロードします。
@param filename gemspec のファイル名を指定します。
@raise StandardError gemspec ファイル内でこのメソッドを呼んでいる場合に発生します。 -
OpenSSL
:: X509 :: Certificate . new -> OpenSSL :: X509 :: Certificate (9337.0) -
証明書オブジェクトを生成します。
証明書オブジェクトを生成します。
引数を与えなかった場合には、空の証明書を返します。
obj が String である場合には、それを
PEM 形式もしくは DER 形式の証明書データの文字列であると見なして
その内容から証明書オブジェクトを生成します。
obj が IO である場合には、そのファイルの中身から
証明書オブジェクトを生成します。
obj が OpenSSL::X509::Certificate オブジェクトである場合には、
そのオブジェクトの内容を複製します。
obj が to_der メソッドを持つ場合には、そのメソッドによって
DER 形式のバイト列に変換し、証明... -
OpenSSL
:: X509 :: Certificate . new(obj) -> OpenSSL :: X509 :: Certificate (9337.0) -
証明書オブジェクトを生成します。
証明書オブジェクトを生成します。
引数を与えなかった場合には、空の証明書を返します。
obj が String である場合には、それを
PEM 形式もしくは DER 形式の証明書データの文字列であると見なして
その内容から証明書オブジェクトを生成します。
obj が IO である場合には、そのファイルの中身から
証明書オブジェクトを生成します。
obj が OpenSSL::X509::Certificate オブジェクトである場合には、
そのオブジェクトの内容を複製します。
obj が to_der メソッドを持つ場合には、そのメソッドによって
DER 形式のバイト列に変換し、証明... -
Rake
:: InvocationChain # append(task _ name) -> Rake :: InvocationChain (9337.0) -
与えられたタスク名を追加して新しい Rake::InvocationChain を返します。
与えられたタスク名を追加して新しい Rake::InvocationChain を返します。
@param task_name 追加するタスク名を指定します。
@raise RuntimeError 循環したタスクの呼び出しを検出した場合に発生します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
invocation_chain= Rake::InvocationChain.new("task_a", Rake::InvocationChain:... -
Rake
:: InvocationChain . append(task _ name , chain) -> Rake :: InvocationChain (9337.0) -
与えられたタスク名を第二引数の Rake::InvocationChain に追加します。
与えられたタスク名を第二引数の Rake::InvocationChain に追加します。
@param task_name タスク名を指定します。
@param chain 既に存在する Rake::InvocationChain のインスタンスを指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
chain = Rake::InvocationChain::EMPTY
b = Rake::InvocationChain.append... -
String
# concat(*arguments) -> self (9322.0) -
self に複数の文字列を破壊的に連結します。
self に複数の文字列を破壊的に連結します。
引数の値が整数である場合は Integer#chr の結果に相当する文字を末尾に追加します。追加する文字のエンコーディングは self.encoding です。
self を返します。
@param arguments 複数の文字列もしくは 0 以上の整数
//emlist[例][ruby]{
str = "foo"
str.concat
p str # => "foo"
str = "foo"
str.concat "bar", "baz"
p str # => "foobarbaz"
str = "foo"
str.... -
String
# concat(other) -> self (9322.0) -
self に文字列 other を破壊的に連結します。 other が 整数である場合は other.chr(self.encoding) 相当の文字を末尾に追加します。
self に文字列 other を破壊的に連結します。
other が 整数である場合は other.chr(self.encoding) 相当の文字を末尾に追加します。
self を返します。
@param other 文字列もしくは 0 以上の整数
//emlist[例][ruby]{
str = "string"
str.concat "XXX"
p str # => "stringXXX"
str << "YYY"
p str # => "stringXXXYYY"
str << 65 # 文字AのASCIIコード
p str # => "stri... -
Gem
:: Specification . _ load(str) -> Gem :: Specification (9319.0) -
マーシャルされたデータをロードするためのメソッドです。
マーシャルされたデータをロードするためのメソッドです。
@param str マーシャルされたデータを指定します。 -
Gem
:: Specification . from _ yaml(input) -> Gem :: Specification (9319.0) -
YAML ファイルから gemspec をロードします。
YAML ファイルから gemspec をロードします。
YAML ファイルから Gem::Specification をロードすると、通常の Ruby オブジェクトの
初期化ルーチン (#initialize) を通りません。このメソッドは初期化ルーチンの一部を実行し、
gemspec のバージョンチェックも行います。
@param input 文字列か IO オブジェクトを指定します。 -
Gem
:: Specification # cert _ chain=(arr) (9067.0) -
@todo
@todo
@param arr デフォルトは空の配列です。 -
Gem
:: Specification # add _ dependency(gem , *requirements) -> [Gem :: Dependency] (9055.0) -
この gem の RUNTIME 依存性を追加します。 実行時に必要となる gem を指定します。
この gem の RUNTIME 依存性を追加します。
実行時に必要となる gem を指定します。
//emlist[][ruby]{
# https://github.com/rurema/bitclust/blob/v1.2.3/bitclust-core.gemspec#L25
s.add_runtime_dependency "progressbar", ">= 1.9.0", "< 2.0"
//}
@param gem 依存する gem の名前か Gem::Dependency のインスタンスを指定します。
@param requirements バージョンの必要条件を 0... -
Gem
:: Specification # add _ development _ dependency(gem , *requirements) -> [Gem :: Dependency] (9055.0) -
この gem の DEVELOPMENT 依存性を追加します。 この gem の開発時に必要となる gem を指定します。
この gem の DEVELOPMENT 依存性を追加します。
この gem の開発時に必要となる gem を指定します。
//emlist[][ruby]{
gem "rack", "~> 1.6", ">= 1.6.12"
//}
@param gem 依存する gem の名前か Gem::Dependency のインスタンスを指定します。
@param requirements バージョンの必要条件を 0 個以上指定します。デフォルトは ">= 0" です。
@see Gem::Specification#add_runtime_dependency, Gem::Depende... -
Gem
:: Specification # add _ runtime _ dependency(gem , *requirements) -> [Gem :: Dependency] (9055.0) -
この gem の RUNTIME 依存性を追加します。 実行時に必要となる gem を指定します。
この gem の RUNTIME 依存性を追加します。
実行時に必要となる gem を指定します。
//emlist[][ruby]{
# https://github.com/rurema/bitclust/blob/v1.2.3/bitclust-core.gemspec#L25
s.add_runtime_dependency "progressbar", ">= 1.9.0", "< 2.0"
//}
@param gem 依存する gem の名前か Gem::Dependency のインスタンスを指定します。
@param requirements バージョンの必要条件を 0... -
Gem
:: Specification . required _ attribute(name , default = nil) -> () (9055.0) -
必須の属性を作成します。
必須の属性を作成します。
@param name 属性名を指定します。
@param default デフォルト値を指定します。
@see Gem::Specification.attribute -
OpenSSL
:: X509 :: Certificate # add _ extension(ext) -> OpenSSL :: X509 :: Extension (9055.0) -
拡張領域に拡張を追加します。
拡張領域に拡張を追加します。
@return 追加した拡張を返します
@param ext 追加する拡張(OpenSSL::X509::Extension オブジェクト)
@raise OpenSSL::X509::CertificateError 設定に失敗した場合に発生します -
Gem
:: Specification # cert _ chain -> Array (9049.0) -
@todo
@todo -
Gem
:: Specification # date=(date) (9049.0) -
@param date 日付をセットします。デフォルトは今日です。
@param date 日付をセットします。デフォルトは今日です。 -
Gem
:: Specification # yaml _ initialize (9049.0) -
@todo
@todo -
Gem
:: Specification . attribute _ defaults -> Array (9049.0) -
@todo
@todo
@@attributes の複製を返します。 -
Gem
:: Specification :: MARSHAL _ FIELDS -> Hash (9049.0) -
@todo
@todo -
RSS
:: Maker :: ItemsBase :: ItemBase # enclosure (9049.0) -
@todo
@todo -
RSS
:: Maker :: ItemsBase :: ItemBase # guid (9049.0) -
@todo
@todo -
RSS
:: Maker :: ItemsBase :: ItemBase # source (9049.0) -
@todo
@todo -
RSS
:: Rss :: Channel :: Item :: Category # content (9049.0) -
@todo
@todo