種類
- インスタンスメソッド (1137)
- 特異メソッド (555)
- 文書 (134)
- ライブラリ (24)
- モジュール関数 (12)
ライブラリ
クラス
- Array (12)
-
CGI
:: Session (24) -
CSV
:: Row (4) - DBM (48)
- Data (3)
- Date (3)
- DateTime (3)
- GDBM (84)
- Hash (343)
-
IRB
:: Inspector (12) - MatchData (7)
- Module (12)
-
Net
:: HTTP (24) -
Net
:: IMAP (24) -
ObjectSpace
:: WeakMap (12) -
OpenSSL
:: Cipher (12) -
OpenSSL
:: Engine (24) -
OpenSSL
:: OCSP :: Request (12) -
OpenSSL
:: PKCS12 (12) -
OpenSSL
:: PKey :: DSA (120) -
OpenSSL
:: PKey :: EC (36) -
OpenSSL
:: PKey :: EC :: Group (24) -
OpenSSL
:: PKey :: RSA (132) -
OpenSSL
:: SSL :: SSLContext (24) - OpenStruct (10)
- Proc (3)
-
REXML
:: AttlistDecl (12) -
REXML
:: Element (24) - SDBM (48)
- Struct (36)
- Thread (12)
- Time (3)
-
YAML
:: DBM (72)
モジュール
-
CGI
:: QueryExtension (12) - Enumerable (12)
- GC (24)
- Kernel (12)
-
Net
:: HTTPHeader (72) - TSort (92)
- URI (12)
オブジェクト
- ENV (237)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - Hash (12)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 7 . 0 (6) - Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (12)
- Ruby用語集 (12)
- [] (120)
- []= (48)
- assoc (36)
- bytebegin (2)
- byteend (2)
- chunk (12)
- create (12)
-
curve
_ name (12) -
deconstruct
_ keys (25) -
def
_ inspector (12) - default (24)
-
default
_ proc (12) -
default
_ proc= (12) - delete (96)
-
delete
_ attribute (12) -
delete
_ if (48) - dig (30)
-
drb
/ ssl (12) -
each
_ element _ with _ attribute (12) -
each
_ strongly _ connected _ component (46) -
encode
_ www _ form (12) - export (48)
- fetch (120)
- filter! (28)
- index (50)
-
keep
_ if (48) - key= (24)
-
keyword
_ init? (4) -
latest
_ gc _ info (24) -
load
_ private _ key (12) -
load
_ public _ key (12) - new (160)
- open (24)
- parameters (3)
-
pkcs5
_ keyivgen (12) -
private
_ key (12) -
private
_ key= (12) -
public
_ key (12) - reject (24)
- reject! (48)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 2 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) -
ruby2
_ keywords (12) - search (12)
- seed (12)
- select! (48)
- shift (12)
- sign (12)
- store (12)
-
thread
_ variable _ get (12) -
to
_ pem (48) -
to
_ s (48) - tsort (12)
-
tsort
_ each (46) -
uid
_ search (12) -
values
_ at (48) - クラス/メソッドの定義 (12)
- パターンマッチ (12)
検索結果
先頭5件
-
Date
# deconstruct _ keys(array _ of _ names _ or _ nil) -> Hash (6213.0) -
パターンマッチに使用する名前と値の Hash を返します。
...:wday
@param array_of_names_or_nil パターンマッチに使用する名前の配列を指定します。nil の場合は全てをパターンマッチに使用します。
//emlist[例][ruby]{
d = Date.new(2022, 10, 5)
if d in wday: 3, day: ..7 # deconstruct_keys が使われます
puts "fir... -
DateTime
# deconstruct _ keys(array _ of _ names _ or _ nil) -> Hash (6213.0) -
パターンマッチに使用する名前と値の Hash を返します。
...ram array_of_names_or_nil パターンマッチに使用する名前の配列を指定します。nil の場合は全てをパターンマッチに使用します。
//emlist[例][ruby]{
dt = DateTime.new(2022, 10, 5, 13, 30)
if dt in wday: 1..5, hour: 10..18 # deconstruct_keys が使われます... -
Time
# deconstruct _ keys(array _ of _ names _ or _ nil) -> Hash (6213.0) -
パターンマッチに使用する名前と値の Hash を返します。
...@param array_of_names_or_nil パターンマッチに使用する名前の配列を指定します。nil の場合は全てをパターンマッチに使用します。
//emlist[例][ruby]{
t = Time.utc(2022, 10, 5, 21, 25, 30)
if t in wday: 3, day: ..7 # deconstruct_keys が使われます
put... -
CSV
:: Row # deconstruct _ keys(keys) -> Hash (6206.0) -
パターンマッチに使用するヘッダの名前と値の Hash を返します。
...ターンマッチしたい場合はキーをシンボルに変換する必要があります。
@param keys パターンマッチに使用するヘッダの名前の配列を指定します。nil の場合は全てをパターンマッチに使用します。
//emlist[例][ruby]{
require "csv"
r... -
Module
# ruby2 _ keywords(method _ name , . . . ) -> nil (6201.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.
...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 arg......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 to another
method, and only for backward......aware that if this method is removed, the behavior of the
method will change so that it does not pass through keywords.
//emlist[例][ruby]{
module Mod
def foo(meth, *args, &block)
send(:"do_#{meth}", *args, &block)
end
ruby2_keywords(:foo) if respond_to?(:ruby2_keywords, true)
end
//}... -
MatchData
# deconstruct _ keys(array _ of _ names) -> Hash (6118.0) -
引数で指定された名前の名前付きキャプチャを Hash で返します。
...します。nil の場合は全ての名前付きキャプチャを意味します。
//emlist[例][ruby]{
m = /(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})/.match("18:37:22")
m.deconstruct_keys([:hours, :minutes]) # => {:hours => "18", :minutes => "37"}
m.deconstruct_keys(nil) # => {:hours......=> "18", :minutes => "37", :seconds => "22"}
# 名前付きキャプチャが定義されていなかった場合は空のハッシュを返す
m = /(\d{2}):(\d{2}):(\d{2})/.match("18:37:22")
m.deconstruct_keys(nil) # => {}
//}
@see d:spec/pattern_matching#matching_non_primitive_objects... -
Struct
# deconstruct _ keys(array _ of _ names) -> Hash (6118.0) -
self のメンバの名前と値の組を Hash で返します。
...ンバの名前の配列を指定します。nil の場合は全てのメンバを意味します。
//emlist[例][ruby]{
Customer = Struct.new(:name, :address, :zip)
joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
h = joe.deconstruct_keys([:zip, :address])
h # => {:zip=>12345, :add......ress=>"123 Maple, Anytown NC"}
# 引数が nil の場合は全てのメンバを返します。
h = joe.deconstruct_keys(nil)
h # => {:name=>"Joseph Smith, Jr.", :address=>"123 Maple, Anytown NC", :zip=>12345}
//}
[注意] 本メソッドの記述は Struct の下位クラスのインスタンス... -
OpenSSL
:: PKey :: DSA # export(cipher=nil , pass=nil) -> String (3212.0) -
鍵を PEM 形式で出力します。
鍵を PEM 形式で出力します。
cipher と pass が指定された場合、
秘密鍵を暗号 cipher OpenSSL::Cipher::Cipher
とパスワード pass を使って暗号化します。
cipher を指定して pass を省略した場合は
渡されたブロックを呼びだしてパスフレーズを要求します。ブロックの返り値を
パスフレーズとみなして暗号化します。
ブロックの引数は通常は true が渡されますが、
これはそのパスフレーズが秘密鍵の暗号化に使われることを意味します。
ブロックが渡されなかった場合にはターミナルに問い合わせをします。
公開鍵を出力する場合は ciphe... -
OpenSSL
:: PKey :: DSA # export(cipher=nil , pass=nil) {|flag| . . . } -> String (3212.0) -
鍵を PEM 形式で出力します。
鍵を PEM 形式で出力します。
cipher と pass が指定された場合、
秘密鍵を暗号 cipher OpenSSL::Cipher::Cipher
とパスワード pass を使って暗号化します。
cipher を指定して pass を省略した場合は
渡されたブロックを呼びだしてパスフレーズを要求します。ブロックの返り値を
パスフレーズとみなして暗号化します。
ブロックの引数は通常は true が渡されますが、
これはそのパスフレーズが秘密鍵の暗号化に使われることを意味します。
ブロックが渡されなかった場合にはターミナルに問い合わせをします。
公開鍵を出力する場合は ciphe... -
OpenSSL
:: PKey :: DSA # to _ pem(cipher=nil , pass=nil) -> String (3212.0) -
鍵を PEM 形式で出力します。
鍵を PEM 形式で出力します。
cipher と pass が指定された場合、
秘密鍵を暗号 cipher OpenSSL::Cipher::Cipher
とパスワード pass を使って暗号化します。
cipher を指定して pass を省略した場合は
渡されたブロックを呼びだしてパスフレーズを要求します。ブロックの返り値を
パスフレーズとみなして暗号化します。
ブロックの引数は通常は true が渡されますが、
これはそのパスフレーズが秘密鍵の暗号化に使われることを意味します。
ブロックが渡されなかった場合にはターミナルに問い合わせをします。
公開鍵を出力する場合は ciphe... -
OpenSSL
:: PKey :: DSA # to _ pem(cipher=nil , pass=nil) {|flag| . . . } -> String (3212.0) -
鍵を PEM 形式で出力します。
鍵を PEM 形式で出力します。
cipher と pass が指定された場合、
秘密鍵を暗号 cipher OpenSSL::Cipher::Cipher
とパスワード pass を使って暗号化します。
cipher を指定して pass を省略した場合は
渡されたブロックを呼びだしてパスフレーズを要求します。ブロックの返り値を
パスフレーズとみなして暗号化します。
ブロックの引数は通常は true が渡されますが、
これはそのパスフレーズが秘密鍵の暗号化に使われることを意味します。
ブロックが渡されなかった場合にはターミナルに問い合わせをします。
公開鍵を出力する場合は ciphe... -
OpenSSL
:: PKey :: DSA # to _ s(cipher=nil , pass=nil) -> String (3212.0) -
鍵を PEM 形式で出力します。
鍵を PEM 形式で出力します。
cipher と pass が指定された場合、
秘密鍵を暗号 cipher OpenSSL::Cipher::Cipher
とパスワード pass を使って暗号化します。
cipher を指定して pass を省略した場合は
渡されたブロックを呼びだしてパスフレーズを要求します。ブロックの返り値を
パスフレーズとみなして暗号化します。
ブロックの引数は通常は true が渡されますが、
これはそのパスフレーズが秘密鍵の暗号化に使われることを意味します。
ブロックが渡されなかった場合にはターミナルに問い合わせをします。
公開鍵を出力する場合は ciphe... -
OpenSSL
:: PKey :: DSA # to _ s(cipher=nil , pass=nil) {|flag| . . . } -> String (3212.0) -
鍵を PEM 形式で出力します。
鍵を PEM 形式で出力します。
cipher と pass が指定された場合、
秘密鍵を暗号 cipher OpenSSL::Cipher::Cipher
とパスワード pass を使って暗号化します。
cipher を指定して pass を省略した場合は
渡されたブロックを呼びだしてパスフレーズを要求します。ブロックの返り値を
パスフレーズとみなして暗号化します。
ブロックの引数は通常は true が渡されますが、
これはそのパスフレーズが秘密鍵の暗号化に使われることを意味します。
ブロックが渡されなかった場合にはターミナルに問い合わせをします。
公開鍵を出力する場合は ciphe...
