235件ヒット
[1-100件を表示]
(0.094秒)
別のキーワード
種類
- インスタンスメソッド (136)
- ライブラリ (44)
- 特異メソッド (28)
- 文書 (16)
- 定数 (11)
ライブラリ
- ビルトイン (92)
-
irb
/ cmd / help (11) - json (11)
- psych (17)
-
rexml
/ document (44)
クラス
- Encoding (11)
-
IRB
:: ExtendCommand :: Help (11) - MatchData (11)
- Module (48)
-
REXML
:: Attribute (11) -
REXML
:: Attributes (11) -
REXML
:: Element (22) - Regexp (11)
- RubyVM (11)
キーワード
-
INSTRUCTION
_ NAMES (11) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) - [] (11)
- cgi (11)
- execute (11)
- irb (11)
- namespace (22)
- namespaces (22)
- private (16)
-
private
_ class _ method (8) - public (16)
-
public
_ class _ method (8) - rdoc (11)
-
rubygems
/ commands / search _ command (11) -
safe
_ load (17)
検索結果
先頭5件
-
MatchData
# names -> [String] (18326.0) -
名前付きキャプチャの名前を文字列配列で返します。
...前を文字列配列で返します。
self.regexp.names と同じです。
//emlist[例][ruby]{
/(?<foo>.)(?<bar>.)(?<baz>.)/.match("hoge").names
# => ["foo", "bar", "baz"]
m = /(?<x>.)(?<y>.)?/.match("a") # => #<MatchData "a" x:"a" y:nil>
m.names # => ["x", "y"]
//}... -
Regexp
# names -> [String] (18326.0) -
正規表現に含まれる名前付きキャプチャ(named capture)の名前を 文字列の配列で返します。
...正規表現に含まれる名前付きキャプチャ(named capture)の名前を
文字列の配列で返します。
//emlist[例][ruby]{
/(?<foo>.)(?<bar>.)(?<baz>.)/.names
# => ["foo", "bar", "baz"]
/(?<foo>.)(?<foo>.)/.names
# => ["foo"]
/(.)(.)/.names
# => []
//}... -
Encoding
# names -> String (18320.0) -
エンコーディングの名前とエイリアス名の配列を返します。
...エンコーディングの名前とエイリアス名の配列を返します。
//emlist[例][ruby]{
Encoding::UTF_8.names #=> ["UTF-8", "CP65001"]
//}... -
RubyVM
:: INSTRUCTION _ NAMES -> [String] (9302.0) -
RubyVM の命令シーケンスの名前の一覧を返します。
...
RubyVM の命令シーケンスの名前の一覧を返します。
@see RubyVM::InstructionSequence... -
REXML
:: Attributes # namespaces -> { String => String } (6408.0) -
self の中で宣言されている名前空間の集合を返します。
...。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='<'/>
</root>
EOS
a = doc.get_elements("/root/a").first
p doc.root.attributes.namespaces
# => {"fo......o"=>"http://example.org/foo", "bar"=>"http://example.org/bar"}
p a.attributes.namespaces
# => {}
//}... -
REXML
:: Element # namespaces -> {String => String} (6408.0) -
self の文脈で定義されている名前空間の情報を返します。
...義されている名前空間を、{ prefix => 識別子 }
というハッシュテーブルで返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a xmlns:x='1' xmlns:y='2'><b/><c xmlns:z='3'/></a>")
doc.elements['//b'].namespaces # => {"x"=>"1", "y"=>"2"}
//}... -
REXML
:: Attribute # namespace(arg = nil) -> String | nil (6307.0) -
属性の名前空間の URI を返します。
...略します。
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("el")
e.add_attribute("xmlns:ns", "http://www.example.com/ns")
e.add_attribute("ns:r", "rval")
p e.attributes.get_attribute("r").prefix # => "ns"
p e.attributes.get_attribute("r").namespace # => "http://www.example.c... -
REXML
:: Element # namespace(prefix=nil) -> String (6307.0) -
self の文脈で prefix が指している名前空間の URI を返します。
...ます。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a xmlns='1' xmlns:y='2'><b/><c xmlns:z='3'/><y:d /></a>")
b = doc.elements['//b']
b.namespace # => "1"
b.namespace("y") # => "2"
b.namespace("z") # => nil
d = doc.elements['//y:d']
d.namespace # => "2"
//}... -
rubygems
/ commands / search _ command (6132.0) -
指定された文字列を含む Gem パッケージを全て表示するためのライブラリです。
...Usage: gem search [STRING] [options]
Options:
-i, --[no-]installed Check for installed gem
-v, --version VERSION Specify version of gem to search
-d, --[no-]details Display detailed information of gem(s)
--[no-]versions......splay only gem names
-a, --all Display all gem versions
Local/Remote Options:
-l, --local 操作をローカルに限定します
-r, --remote 操作をリモートに限定します
-b, --both......します
-B, --bulk-threshold COUNT Threshold for switching to bulk
synchronization (default 1000)
--source URL Gem パッケージのリモートリポジトリの URL を指定します
--[no-]http-proxy [URL]... -
NEWS for Ruby 2
. 7 . 0 (3891.0) -
NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 2.7.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。
== 2.6.0 以降の変更
=== 言語仕様の変更
==== パターンマッチ
* パターンマッチが実験的機能として導入されました。 14912
//emlist[][ruby]{
case [0, [1, 2, 3]]
in [a, [b......p var #=> 1
end
//}
//emlist[][ruby]{
case -1
in 0 then :unreachable
in 1 then :unreachable
end #=> NoMatchingPatternError
//}
//emlist{
json = <<END
{
"name": "Alice",
"age": 30,
"children": [{ "name": "Bob", "age": 2 }]
}
END
JSON.parse(json, symbolize_names: true) in {name: "Alice", chil...