ライブラリ
- ビルトイン (49)
- bigdecimal (2)
-
cgi
/ html (2) - csv (1)
- etc (1)
-
net
/ http (2) - objspace (5)
- open3 (2)
- openssl (58)
- pathname (1)
- rake (20)
-
rdoc
/ context (1) - rss (33)
-
rubygems
/ dependency _ list (3) -
rubygems
/ exceptions (1) -
rubygems
/ gem _ path _ searcher (2) -
rubygems
/ installer (2) -
rubygems
/ old _ format (1) -
rubygems
/ package / tar _ input (1) -
rubygems
/ security (2) -
rubygems
/ source _ index (6) -
rubygems
/ source _ info _ cache (1) -
rubygems
/ specification (62) -
rubygems
/ uninstaller (1) - shell (6)
-
shell
/ builtin-command (6) -
shell
/ command-processor (6) -
shell
/ filter (10) - stringio (1)
- strscan (1)
-
webrick
/ httpauth / authenticator (11) -
webrick
/ httpauth / basicauth (1) -
webrick
/ https (2)
クラス
-
ARGF
. class (1) - Array (1)
- BigDecimal (2)
- CSV (1)
- Class (1)
- Encoding (1)
-
Enumerator
:: Lazy (2) - Exception (1)
- File (2)
- Float (1)
-
Gem
:: DependencyList (3) -
Gem
:: GemPathSearcher (2) -
Gem
:: Installer (2) -
Gem
:: OldFormat (1) -
Gem
:: Package :: TarInput (1) -
Gem
:: SourceIndex (6) -
Gem
:: SourceInfoCache (1) -
Gem
:: Specification (62) -
Gem
:: Uninstaller (1) - Hash (2)
- IO (1)
- Integer (1)
- Method (1)
- Module (1)
-
Net
:: HTTP (2) - Object (1)
-
OpenSSL
:: OCSP :: BasicResponse (1) -
OpenSSL
:: OCSP :: CertificateId (4) -
OpenSSL
:: OCSP :: Request (1) -
OpenSSL
:: PKCS12 (2) -
OpenSSL
:: PKCS7 (3) -
OpenSSL
:: SSL :: SSLContext (5) -
OpenSSL
:: SSL :: SSLSocket (3) -
OpenSSL
:: X509 :: Certificate (27) -
OpenSSL
:: X509 :: ExtensionFactory (4) -
OpenSSL
:: X509 :: Store (1) -
OpenSSL
:: X509 :: StoreContext (2) - Pathname (1)
- Proc (1)
-
RDoc
:: Context (1) -
RSS
:: Maker :: ChannelBase (1) -
RSS
:: Maker :: ChannelBase :: CategoriesBase (1) -
RSS
:: Maker :: ChannelBase :: CategoriesBase :: CategoryBase (4) -
RSS
:: Maker :: ItemsBase :: ItemBase (1) -
RSS
:: Rss :: Channel (3) -
RSS
:: Rss :: Channel :: Item (3) -
RSS
:: Rss :: Channel :: Item :: Category (4) -
Rake
:: Application (12) -
Rake
:: InvocationChain (2) -
Rake
:: InvocationChain :: EmptyInvocationChain (1) -
Rake
:: Task (2) - Rational (1)
- Shell (6)
-
Shell
:: Cat (2) -
Shell
:: CommandProcessor (6) -
Shell
:: Concat (2) -
Shell
:: Filter (10) - String (1)
- StringIO (1)
- StringScanner (1)
- Thread (3)
-
Thread
:: Backtrace :: Location (7) - UnboundMethod (1)
-
WEBrick
:: HTTPAuth :: BasicAuth (1) -
WEBrick
:: HTTPRequest (2)
モジュール
-
CGI
:: HtmlExtension (2) - Comparable (1)
- Enumerable (12)
- Etc (1)
-
Gem
:: Security (2) - Kernel (4)
- ObjectSpace (5)
- Open3 (2)
-
OpenSSL
:: OCSP (1) -
OpenSSL
:: X509 (1) -
RSS
:: SyndicationModel (6) - Rake (2)
-
WEBrick
:: HTTPAuth :: Authenticator (7) -
WEBrick
:: HTTPAuth :: ProxyAuthenticator (4)
キーワード
- Application (1)
- AuthException (2)
- AuthScheme (1)
- Categories (3)
- CategoriesBase (1)
- Category (4)
- CategoryBase (1)
- Certificate (1)
- CertificateError (1)
- CertificateId (1)
- Concat (1)
-
DEFAULT
_ RAKEFILES (1) - InfoField (1)
- InvalidSpecificationException (1)
- Location (1)
-
MARSHAL
_ FIELDS (1) -
REVOKED
_ STATUS _ CERTIFICATEHOLD (1) - RequestField (2)
- ResponseField (2)
- ResponseInfoField (1)
- Rubyの起動 (1)
-
SC
_ 2 _ PBS _ LOCATE (1) - SyndicationModel (1)
-
V
_ ERR _ APPLICATION _ VERIFICATION (1) -
_ load (1) -
absolute
_ path (1) -
add
_ bindir (1) -
add
_ certificate (1) -
add
_ dependency (1) -
add
_ development _ dependency (1) -
add
_ extension (1) -
add
_ loader (1) -
add
_ runtime _ dependency (1) - allocate (1)
-
allocation
_ sourcefile (1) -
allocation
_ sourceline (1) - application (2)
- application= (2)
-
assign
_ defaults (1) -
attribute
_ alias _ singular (1) -
attribute
_ defaults (1) - authenticate (1)
- autorequire= (1)
-
backtrace
_ locations (3) -
base
_ label (1) - between? (1)
-
build
_ cert (1) -
ca
_ certs (1) -
caller
_ locations (2) - cat (3)
- catch (2)
-
catch
_ i (1) - categories (3)
- category (2)
- category= (2)
- cert (3)
- cert= (1)
- certid (1)
- certificate (1)
- certificates (1)
- certificates= (1)
- chain (2)
-
check
_ private _ key (1) -
client
_ ca (1) -
client
_ cert (1) -
close
_ on _ exec= (1) - cmp (1)
-
cmp
_ issuer (1) - collect (2)
-
collect
_ concat (3) - concat (6)
- content (2)
- content= (2)
-
current
_ cert (1) - debug (1)
-
default
_ executable (1) -
default
_ executable= (1) -
default
_ value (1) -
dependency
_ order (1) -
deprecate
_ constant (1) -
development
_ dependencies (1) - domain (2)
- domain= (2)
- each (3)
- echo (3)
- email (1)
- email= (1)
- enclosure (1)
- executable (1)
- executable= (1)
- executables (1)
- executables= (1)
- extensions (1)
- extensions= (1)
-
extra
_ chain _ cert (1) -
extra
_ chain _ cert= (1) -
extra
_ rdoc _ files (1) -
extra
_ rdoc _ files= (1) -
fetch
_ values (2) -
file
_ name (1) - files (1)
- files= (1)
- find (1)
-
find
_ all (1) -
find
_ name (2) -
flat
_ map (3) - form (2)
-
from
_ installed _ gems (1) -
from
_ yaml (1) -
full
_ gem _ path (1) -
full
_ name (1) - glob (3)
-
has
_ rdoc (1) -
has
_ rdoc= (1) -
has
_ rdoc? (1) -
has
_ test _ suite? (1) -
has
_ unit _ tests? (1) - init (1)
-
inplace
_ mode (1) - inspect (1)
- install (1)
-
installation
_ path (1) -
instance
_ variable _ defined? (1) - issuer (1)
- issuer= (1)
-
issuer
_ certificate (1) -
issuer
_ certificate= (1) - label (1)
-
lib
_ files (1) - lineno (1)
- list (1)
-
list
_ concat (1) -
literal
_ concat (1) -
literal
_ concat _ dstr (1) -
literal
_ concat _ list (1) -
literal
_ concat _ string (1) - load (1)
-
load
_ gemspec (1) -
load
_ rakefile (1) -
load
_ specification (1) - loaded= (1)
- loaded? (1)
-
loaded
_ from (1) -
loaded
_ from= (1) - logger (1)
- map (2)
-
mark
_ locations _ array (1) - member? (2)
- name (1)
- new (6)
-
new
_ category (1) - none? (2)
- normalize (1)
-
normalize
_ yaml _ input (1) -
not
_ after (1) -
not
_ after= (1) -
not
_ before (1) -
not
_ before= (1) - one? (2)
-
original
_ dir (1) -
original
_ name (1) -
original
_ platform (1) -
original
_ platform= (1) - path (1)
-
peer
_ cert (2) -
peer
_ cert _ chain (1) -
pipeline
_ rw (2) - platform (1)
- platform= (1)
-
public
_ key (1) -
public
_ key= (1) - rakefile (1)
-
rb
_ ary _ concat (1) -
rb
_ catch (1) -
rb
_ class _ allocate _ instance (1) -
rb
_ f _ catch (1) -
rb
_ gc _ mark _ locations (1) -
rb
_ str _ cat (1) -
rb
_ str _ cat2 (1) -
rb
_ str _ concat (1) -
read
_ only (1) - realm (1)
-
record
_ location (1) -
remove
_ by _ name (1) -
remove
_ spec (1) - replicate (1)
-
required
_ attribute (1) -
required
_ attribute? (1) -
rubygems
/ commands / specification _ command (1) - run (1)
-
satisfies
_ requirement? (1) - search (2)
- serial (2)
- serial= (1)
-
server
_ cert (1) - shell (1)
- sign (1)
-
sign
_ cert (1) -
signature
_ algorithm (1) -
source
_ location (3) - spec (3)
- specification (1)
- status (1)
- subject (1)
- subject= (1)
-
subject
_ certificate (1) -
subject
_ certificate= (1) -
sy
_ updateBase (1) -
sy
_ updateBase= (1) -
sy
_ updateFrequency (1) -
sy
_ updateFrequency= (1) -
sy
_ updatePeriod (1) -
sy
_ updatePeriod= (1) - tee (3)
-
test
_ file (1) -
test
_ file= (1) -
test
_ files (1) -
test
_ files= (1) -
test
_ suite _ file (1) -
test
_ suite _ file= (1) -
thread
_ variable _ set (1) -
to
_ a (1) -
to
_ der (1) -
to
_ pem (1) -
to
_ s (3) -
to
_ text (1) -
top
_ level (1) -
top
_ level _ tasks (1) -
trace
_ object _ allocations (1) -
trace
_ object _ allocations _ start (1) -
trace
_ object _ allocations _ stop (1) - truncate (13)
-
tty
_ output= (1) - validate (1)
- verify (1)
- version (1)
- version= (1)
-
yaml
_ initialize (1) - | (1)
- 制御構造 (1)
- 正規表現 (1)
検索結果
先頭5件
-
static NODE * literal
_ concat _ list(NODE *head , NODE *tail) (114901.0) -
-
static NODE * list
_ concat(NODE *head , NODE *tail) (96601.0) -
NODE_LISTのリストheadにNODE_LISTのノードtailを連結し、 先頭ノードを返す。head、tailともにNULLであってはならない。
NODE_LISTのリストheadにNODE_LISTのノードtailを連結し、
先頭ノードを返す。head、tailともにNULLであってはならない。 -
static NODE * literal
_ concat(NODE *head , NODE *tail) (96601.0) -
-
static NODE * literal
_ concat _ dstr(NODE *head , NODE *tail) (96601.0) -
-
static NODE * literal
_ concat _ string(NODE *head , NODE *tail , VALUE str) (96601.0) -
-
Shell
:: Cat (63001.0) -
-
OpenSSL
:: X509 :: V _ ERR _ APPLICATION _ VERIFICATION -> Integer (54901.0) -
アプリケーションが利用するエラーコードです。
アプリケーションが利用するエラーコードです。
OpenSSL のライブラリでは使われないので、
アプリケーションプログラマが自由に利用することが可能です。
OpenSSL::X509::Store#error や
OpenSSL::X509::StoreContext#error のエラーコードとして
使われます。
@see OpenSSL::X509::Store#verify_callback=,
OpenSSL::X509::StoreContext#error= -
Enumerable
# collect _ concat -> Enumerator (45601.0) -
各要素をブロックに渡し、その返り値を連結した配列を返します。
各要素をブロックに渡し、その返り値を連結した配列を返します。
ブロックの返り値は基本的に配列を返すべきです。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
[[1,2], [3,4]].flat_map{|i| i.map{|j| j*2}} # => [2,4,6,8]
//} -
Enumerable
# collect _ concat {| obj | block } -> Array (45601.0) -
各要素をブロックに渡し、その返り値を連結した配列を返します。
各要素をブロックに渡し、その返り値を連結した配列を返します。
ブロックの返り値は基本的に配列を返すべきです。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
[[1,2], [3,4]].flat_map{|i| i.map{|j| j*2}} # => [2,4,6,8]
//} -
Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] (37201.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
... -
Rake
. application -> Rake :: Application (37201.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,
# ... -
Rake
:: Task # application -> Rake :: Application (37201.0) -
自身を所有している Rake::Application のインスタンスを返します。
自身を所有している Rake::Application のインスタンスを返します。 -
Thread
# backtrace _ locations(range) -> [Thread :: Backtrace :: Location] | nil (37201.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 (37201.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 (36901.0) -
与えられたファイル名から Ruby スクリプト形式の gemspec をロードして Gem::Specification のインスタンスを返します。
与えられたファイル名から Ruby スクリプト形式の gemspec をロードして
Gem::Specification のインスタンスを返します。
@param file_name ファイル名を指定します。
@raise SignalException gemspec をロードしているときに発生します。
@raise SystemExit gemspec をロードしているときに発生します。 -
Kernel
. # caller _ locations(range) -> [Thread :: Backtrace :: Location] | nil (36901.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 (36901.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
... -
static VALUE rb
_ class _ allocate _ instance(VALUE klass) (36901.0) -
Class#allocate の実体です。
Class#allocate の実体です。 -
static void mark
_ locations _ array(register VALUE *x , register long n) (36901.0) -
-
Class
# allocate -> object (36601.0) -
自身のインスタンスを生成して返します。生成したオブジェクトは 自身のインスタンスであること以外には何も特性を持ちません。
自身のインスタンスを生成して返します。生成したオブジェクトは
自身のインスタンスであること以外には何も特性を持ちません。
//emlist[例][ruby]{
klass = Class.new do
def initialize(*args)
@initialized = true
end
def initialized?
@initialized || false
end
end
klass.allocate.initialized? #=> false
//} -
Encoding
# replicate(name) -> Encoding (36601.0) -
レシーバのエンコーディングを複製(replicate)します。 複製されたエンコーディングは元のエンコーディングと同じバイト構造を持たなければなりません。 name という名前のエンコーディングが既に存在する場合は ArgumentError を発生します。
レシーバのエンコーディングを複製(replicate)します。
複製されたエンコーディングは元のエンコーディングと同じバイト構造を持たなければなりません。
name という名前のエンコーディングが既に存在する場合は ArgumentError を発生します。
Ruby 3.2 から非推奨となり、Ruby 3.3 で削除予定です。
//emlist[][ruby]{
encoding = Encoding::UTF_8.replicate("REPLICATED_UTF-8") #=> #<Encoding:REPLICATED_UTF-8>
encoding.name ... -
Enumerator
:: Lazy # collect _ concat {|item| . . . } -> Enumerator :: Lazy (36601.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) ... -
Method
# source _ location -> [String , Integer] | nil (36601.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... -
ObjectSpace
. # allocation _ sourcefile(object) -> String (36601.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 (36601.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... -
ObjectSpace
. # trace _ object _ allocations { . . . } (36601.0) -
与えられたブロック内でオブジェクトのトレースを行います。
与えられたブロック内でオブジェクトのトレースを行います。
//emlist[例][ruby]{
require 'objspace'
class C
include ObjectSpace
def foo
trace_object_allocations do
obj = Object.new
p "#{allocation_sourcefile(obj)}:#{allocation_sourceline(obj)}"
end
end
end
C.new.foo #=> "objtrace.rb:8"
//} -
ObjectSpace
. # trace _ object _ allocations _ start -> nil (36601.0) -
オブジェクト割り当てのトレースを開始します。
オブジェクト割り当てのトレースを開始します。
@see ObjectSpace.#trace_object_allocations_stop -
ObjectSpace
. # trace _ object _ allocations _ stop -> nil (36601.0) -
オブジェクト割り当てのトレースを終了します。
オブジェクト割り当てのトレースを終了します。
トレースを終了する為には、ObjectSpace.#trace_object_allocations_startを呼んだ回数分だけこのメソッドを呼ぶ必要があります。
@see ObjectSpace.#trace_object_allocations_start -
OpenSSL
:: OCSP :: REVOKED _ STATUS _ CERTIFICATEHOLD -> Integer (36601.0) -
OpenSSL::OCSP::BasicResponse#status の失効理由コードで、 一時的な保留を意味します。
OpenSSL::OCSP::BasicResponse#status の失効理由コードで、
一時的な保留を意味します。
詳しくは 3280 や X.509 を参照してください。 -
Proc
# source _ location -> [String , Integer] | nil (36601.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 # => ... -
RDoc
:: Context # record _ location(toplevel) (36601.0) -
Record the file that we happen to find it in
Record the file that we happen to find it in -
Rake
. application=(app) (36601.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... -
Rake
:: Task # application=(app) (36601.0) -
自身を所有している Rake::Application のインスタンスをセットします。
自身を所有している Rake::Application のインスタンスをセットします。
@param app 自身を所有しているアプリケーションを指定します。 -
UnboundMethod
# source _ location -> [String , Integer] | nil (36601.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]
/... -
void rb
_ gc _ mark _ locations(VALUE *start , VALUE *end) (36601.0) -
-
Enumerable
# flat _ map -> Enumerator (36301.0) -
各要素をブロックに渡し、その返り値を連結した配列を返します。
各要素をブロックに渡し、その返り値を連結した配列を返します。
ブロックの返り値は基本的に配列を返すべきです。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
[[1,2], [3,4]].flat_map{|i| i.map{|j| j*2}} # => [2,4,6,8]
//} -
Enumerable
# flat _ map {| obj | block } -> Array (36301.0) -
各要素をブロックに渡し、その返り値を連結した配列を返します。
各要素をブロックに渡し、その返り値を連結した配列を返します。
ブロックの返り値は基本的に配列を返すべきです。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
[[1,2], [3,4]].flat_map{|i| i.map{|j| j*2}} # => [2,4,6,8]
//} -
RSS
:: Maker :: ChannelBase :: CategoriesBase # new _ category (36301.0) -
@todo 新しくcategoryを作成し,返します.作成された categoryはcategoryリストの最後 に追加されています.
@todo
新しくcategoryを作成し,返します.作成された
categoryはcategoryリストの最後
に追加されています. -
Gem
:: InvalidSpecificationException (36001.0) -
不正な gemspec に関する例外です。
不正な gemspec に関する例外です。 -
RSS
:: Maker :: ChannelBase :: CategoriesBase :: CategoryBase (36001.0) -
categoryは maker.channel.categories.new_categoryで作成されたオ ブジェクトとします.
categoryは
maker.channel.categories.new_categoryで作成されたオ
ブジェクトとします.
contentを指定する必要があります. -
RSS
:: Maker :: RSS09 :: Channel :: Categories :: Category (36001.0) -
-
RSS
:: Maker :: RSS10 :: Channel :: Categories :: Category (36001.0) -
-
RSS
:: Maker :: RSS20 :: Channel :: Categories :: Category (36001.0) -
-
RSS
:: SyndicationModel (36001.0) -
-
Rake
:: Application (36001.0) -
Rake で使用するメインのクラスです。
Rake で使用するメインのクラスです。
コマンドラインで rake コマンドを実行した時に作成され、実行されます。 -
Thread
:: Backtrace :: Location (36001.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... -
OpenSSL
:: PKCS12 # certificate -> OpenSSL :: X509 :: Certificate (27901.0) -
自身が保持している証明書を返します。
自身が保持している証明書を返します。 -
OpenSSL
:: PKCS7 # certificates -> [OpenSSL :: X509 :: Certificate] | nil (27901.0) -
署名に添付される証明書を配列で返します。
署名に添付される証明書を配列で返します。 -
OpenSSL
:: SSL :: SSLContext # client _ ca -> [OpenSSL :: X509 :: Certificate] | OpenSSL :: X509 :: Certificate | nil (27901.0) -
クライアント証明書を要求する時にクライアントに送る CA のリスト を返します。
クライアント証明書を要求する時にクライアントに送る CA のリスト
を返します。
@see OpenSSL::SSL::SSLContext#client_ca= -
OpenSSL
:: X509 :: ExtensionFactory # issuer _ certificate -> OpenSSL :: X509 :: Certificate | nil (27901.0) -
自身に設定されている発行者(issuer)の証明書オブジェクトを返します。
自身に設定されている発行者(issuer)の証明書オブジェクトを返します。
証明書が設定されていない場合は nil を返します。 -
OpenSSL
:: X509 :: ExtensionFactory # subject _ certificate -> OpenSSL :: X509 :: Certificate | nil (27901.0) -
自身に設定されている所有者(subject)の証明書オブジェクトを返します。
自身に設定されている所有者(subject)の証明書オブジェクトを返します。
証明書が設定されていない場合は nil を返します。 -
Shell
# concat(*jobs) -> Shell :: Concat (27901.0) -
@todo
@todo -
Shell
:: CommandProcessor # concat(*jobs) -> Shell :: Concat (27901.0) -
@todo
@todo -
Shell
:: Filter # concat(*jobs) -> Shell :: Concat (27901.0) -
@todo
@todo -
Shell
# cat(*files) -> Shell :: Filter (27676.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 (27676.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 (27676.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... -
BigDecimal
# truncate(n) -> BigDecimal (27601.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... -
Enumerator
:: Lazy # flat _ map {|item| . . . } -> Enumerator :: Lazy (27601.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 (27601.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... -
File
. truncate(path , length) -> 0 (27601.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... -
Gem
:: Installer # install -> Gem :: Specification (27601.0) -
Gem をインストールします。
Gem をインストールします。
以下のディレクトリ構造で Gem をインストールします。
@gem_home/
cache/<gem-version>.gem #=> インストールした Gem のコピー
gems/<gem-version>/... #=> インストール時に展開したファイル
specifications/<gem-version>.gemspec #=> gemspec ファイル
@return ロードされた Gem::Specification のインスタンスを返します。
@r... -
Gem
:: Specification # executable=(executable) (27601.0) -
実行可能ファイル名をセットします。
実行可能ファイル名をセットします。
@param executable 実行可能ファイル名を指定します。 -
Gem
:: Specification # executables=(executables) (27601.0) -
実行可能ファイル名のリストをセットします。
実行可能ファイル名のリストをセットします。
@param executables 実行可能ファイル名のリストを指定します。 -
Gem
:: Specification # files=(files) (27601.0) -
この Gem パッケージに含まれるファイル名の配列をセットします。
この Gem パッケージに含まれるファイル名の配列をセットします。
@param files この Gem パッケージに含まれるファイル名の配列を指定します。 -
Gem
:: Specification # platform=(platform) (27601.0) -
この Gem パッケージを使用できるプラットフォームをセットします。
この Gem パッケージを使用できるプラットフォームをセットします。
@param platform この Gem パッケージを使用できるプラットフォームを指定します。
デフォルトは Gem::Platform::RUBY です。
@see Gem::Platform::RUBY -
Gem
:: Specification # test _ file=(file) (27601.0) -
Gem::Specification#test_files= の単数バージョンです。
Gem::Specification#test_files= の単数バージョンです。 -
Gem
:: Specification # test _ files=(files) (27601.0) -
ユニットテストのファイルのリストをセットします。
ユニットテストのファイルのリストをセットします。
@param files ユニットテストのファイルのリストを指定します。 -
Gem
:: Specification # test _ suite _ file=(file) (27601.0) -
この属性は非推奨です。 Gem::Specification#test_files= を使用してください。
この属性は非推奨です。 Gem::Specification#test_files= を使用してください。
@param file テストスイートのファイルを指定します。 -
Gem
:: Specification . _ load(str) -> Gem :: Specification (27601.0) -
マーシャルされたデータをロードするためのメソッドです。
マーシャルされたデータをロードするためのメソッドです。
@param str マーシャルされたデータを指定します。 -
Gem
:: Specification . from _ yaml(input) -> Gem :: Specification (27601.0) -
YAML ファイルから gemspec をロードします。
YAML ファイルから gemspec をロードします。
YAML ファイルから Gem::Specification をロードすると、通常の Ruby オブジェクトの
初期化ルーチン (#initialize) を通りません。このメソッドは初期化ルーチンの一部を実行し、
gemspec のバージョンチェックも行います。
@param input 文字列か IO オブジェクトを指定します。 -
Gem
:: Specification . load(filename) -> Gem :: Specification (27601.0) -
gemspec ファイルをロードします。
gemspec ファイルをロードします。
@param filename gemspec のファイル名を指定します。
@raise StandardError gemspec ファイル内でこのメソッドを呼んでいる場合に発生します。 -
Module
# deprecate _ constant(*name) -> self (27601.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
# =... -
OpenSSL
:: PKCS7 # add _ certificate(cert) -> self (27601.0) -
署名に添付する証明書を追加します。
署名に添付する証明書を追加します。
通常は OpenSSL::PKCS7.sign の引数で添付する証明書を指定した
ほうがよいでしょう。
@param cert 追加する証明書(OpenSSL::X509::Certificate オブジェクト)
@raise OpenSSL::PKCS7::PKCS7Error 追加に失敗した場合に発生します。 -
OpenSSL
:: PKCS7 # certificates=(certificates) (27601.0) -
署名に付ける証明書を指定します。
署名に付ける証明書を指定します。
PKCS7 オブジェクトに元々つけられていた証明書はクリアされます。
通常は OpenSSL::PKCS7.sign の引数で添付する証明書を指定した
ほうがよいでしょう。
@param certificates 証明書(OpenSSL::X509::Certificate オブジェクト)の配列
@raise OpenSSL::PKCS7::PKCS7Error 変更に失敗した場合に発生します。 -
Rake
:: Application # add _ loader(ext , loader) (27601.0) -
与えられた拡張子で終わるファイル名のファイルをロードするためのローダーを 自身に追加します。
与えられた拡張子で終わるファイル名のファイルをロードするためのローダーを
自身に追加します。
@param ext 拡張子を指定します。
@param loader ローダーを指定します。
//emlist[例][ruby]{
require "rake/loaders/makefile"
# Rakefile での記載例とする
task default: :test
task :test
makefile =<<-EOS
<< <<-'SAMPLE_MF'
# Comments
a: a1 a2 a3 a4
EOS
IO.write("sample.mf", makefile)... -
Shell
# truncate(path , length) -> 0 (27601.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param path パスを表す文字列を指定します。
@param length 変更したいサイズを整数で与えます。
@see File.truncate -
Shell
:: CommandProcessor # truncate(path , length) -> 0 (27601.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param path パスを表す文字列を指定します。
@param length 変更したいサイズを整数で与えます。
@see File.truncate -
Shell
:: Filter # truncate(path , length) -> 0 (27601.0) -
File クラスにある同名のクラスメソッドと同じです.
File クラスにある同名のクラスメソッドと同じです.
@param path パスを表す文字列を指定します。
@param length 変更したいサイズを整数で与えます。
@see File.truncate -
WEBrick
:: HTTPAuth :: ProxyAuthenticator :: InfoField -> "Proxy-Authentication-Info" (27601.0) -
キーの名前です。
キーの名前です。 -
WEBrick
:: HTTPAuth :: ProxyAuthenticator :: ResponseField -> "Proxy-Authenticate" (27601.0) -
レスポンスフィールドのキーの名前です。
レスポンスフィールドのキーの名前です。 -
Enumerable
# collect -> Enumerator (27373.0) -
各要素に対してブロックを評価した結果を全て含む配列を返します。
各要素に対してブロックを評価した結果を全て含む配列を返します。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
# すべて 3 倍にした配列を返す
p (1..3).map {|n| n * 3 } # => [3, 6, 9]
p (1..3).collect { "cat" } # => ["cat", "cat", "cat"]
//}
@see Array#collect, Array#map -
Enumerable
# collect {|item| . . . } -> [object] (27373.0) -
各要素に対してブロックを評価した結果を全て含む配列を返します。
各要素に対してブロックを評価した結果を全て含む配列を返します。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
# すべて 3 倍にした配列を返す
p (1..3).map {|n| n * 3 } # => [3, 6, 9]
p (1..3).collect { "cat" } # => ["cat", "cat", "cat"]
//}
@see Array#collect, Array#map -
ARGF
. class # inplace _ mode -> String | nil (27355.0) -
c:ARGF#inplace で書き換えるファイルのバックアップに付加される拡 張子を返します。拡張子が設定されていない場合は空文字列を返します。イン プレースモードでない場合は nil を返します。
c:ARGF#inplace で書き換えるファイルのバックアップに付加される拡
張子を返します。拡張子が設定されていない場合は空文字列を返します。イン
プレースモードでない場合は nil を返します。
Ruby 起動時の -i オプション や ARGF.class#inplace_mode= で設定します。
例:
# $ echo "test" > test.txt
# $ ruby -i.bak test.rb test.txt
# $ cat test.txt # => "TEST"
# $ cat test.txt.bak # => "test"
# test... -
BigDecimal
# truncate -> Integer (27301.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... -
Gem
:: Specification # add _ development _ dependency(gem , *requirements) -> [Gem :: Dependency] (27301.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 # assign _ defaults -> () (27301.0) -
全ての属性にデフォルト値をセットします。
全ての属性にデフォルト値をセットします。
これはアクセサメソッドを使用して行われるので、ブロックを用いた特別な初期化も
きちんと実行されます。セットされる値はデフォルト値のコピーです。 -
Gem
:: Specification # default _ executable -> String | nil (27301.0) -
Gem パッケージ内で gem コマンド経由で実行するファイルを返します。
Gem パッケージ内で gem コマンド経由で実行するファイルを返します。 -
Gem
:: Specification # default _ executable=(executable) (27301.0) -
Gem パッケージ内で gem コマンド経由で実行するファイルをセットします。
Gem パッケージ内で gem コマンド経由で実行するファイルをセットします。
@param executable 実行ファイルを指定します。 -
Gem
:: Specification # development _ dependencies -> Array (27301.0) -
この Gem が依存している Gem のリストを返します。
この Gem が依存している Gem のリストを返します。 -
Gem
:: Specification # email -> String (27301.0) -
メールアドレスを返します。
メールアドレスを返します。 -
Gem
:: Specification # email=(email) (27301.0) -
メールアドレスをセットします。
メールアドレスをセットします。
@param email メールアドレスを指定します。 -
Gem
:: Specification # executable -> String (27301.0) -
実行可能ファイル名を返します。
実行可能ファイル名を返します。 -
Gem
:: Specification # executables -> [String] (27301.0) -
実行可能ファイル名のリストを返します。
実行可能ファイル名のリストを返します。 -
Gem
:: Specification # extra _ rdoc _ files -> [String] (27301.0) -
RDoc でドキュメントを作成する際に使用する特別なファイルのリストを返します。
RDoc でドキュメントを作成する際に使用する特別なファイルのリストを返します。 -
Gem
:: Specification # extra _ rdoc _ files=(paths) (27301.0) -
RDoc でドキュメントを作成する際に使用する特別なファイルのリストをセットします。
RDoc でドキュメントを作成する際に使用する特別なファイルのリストをセットします。
@param paths RDoc でドキュメントを作成する際に使用する特別なファイルのリストを指定します。 -
Gem
:: Specification # file _ name -> String (27301.0) -
生成される Gem パッケージの名前を返します。
生成される Gem パッケージの名前を返します。 -
Gem
:: Specification # files -> [String] (27301.0) -
この Gem パッケージに含まれるファイル名の配列を返します。
この Gem パッケージに含まれるファイル名の配列を返します。 -
Gem
:: Specification # full _ gem _ path -> String (27301.0) -
この Gem パッケージへのフルパスを返します。
この Gem パッケージへのフルパスを返します。 -
Gem
:: Specification # full _ name -> String (27301.0) -
この Gem パッケージのバージョンを含む完全な名前 (name-version) を返します。
この Gem パッケージのバージョンを含む完全な名前 (name-version) を返します。
プラットフォームの情報が指定されている場合は、それも含みます (name-version-platform)。