るりまサーチ

最速Rubyリファレンスマニュアル検索!
650件ヒット [1-100件を表示] (0.147秒)
トップページ > クエリ:i[x] > クエリ:-[x] > クエリ:names[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. csv to_i
  5. matrix i

モジュール

オブジェクト

検索結果

<< 1 2 3 ... > >>

irb (26330.0)

irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。

...irb は Interactive Ruby の略です。
i
rb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。

=== irb の使い方

Ruby さえ知っていれば irb を使うのは簡単です。
i
rb コマンドを実行すると、以下のようなプロン...
...す。
readline ライブラリがインストールされている時には
自動的にコマンドライン編集や履歴の機能が使えるようになります。

=== irb のコマンドラインオプション

i
rb [options] file_name opts
options:
-
f ~/.irbrc を読...
...irb 上で一行ず
つ評価されます。require に成功した場合は true を、そうでない場合は
false を返します。

拡張ライブラリ(*.so,*.o,*.dll など)を指定した場合は単純に require さ
れます。

: help(*names)
: irb_help(*names)

RI から...

Encoding#names -> String (21313.0)

エンコーディングの名前とエイリアス名の配列を返します。

...エンコーディングの名前とエイリアス名の配列を返します。

//emlist[例][ruby]{
Encoding::UTF_8.names #=> ["UTF-8", "CP65001"]
//}...

MatchData#names -> [String] (18319.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] (18319.0)

正規表現に含まれる名前付きキャプチャ(named capture)の名前を 文字列の配列で返します。

...正規表現に含まれる名前付きキャプチャ(named capture)の名前を
文字列の配列で返します。

//emlist[例][ruby]{
/(?<foo>.)(?<bar>.)(?<baz>.)/.names

# => ["foo", "bar", "baz"]
/(?<foo>.)(?<foo>.)/.names
# => ["foo"]

/(.)(.)/.names
# => []
//}...

RubyVM::INSTRUCTION_NAMES -> [String] (12401.0)

RubyVM の命令シーケンスの名前の一覧を返します。

...RubyVM の命令シーケンスの名前の一覧を返します。

@see RubyVM::InstructionSequence...

絞り込み条件を変える

Gem::Specification.attribute_names -> Array (12301.0)

属性名の配列を返します。

属性名の配列を返します。

Rake::TaskManager#in_namespace(name) {|name_space| ... } -> Array (12300.0)

与えられた名前の名前空間でブロックを評価します。

...ます。

@param name 名前を指定します。

//emlist[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app

names
pace :sample do
def hoge
puts "hoge"
end
end

task :test_rake_app do
task.application.in_namespace("sample") do
hoge # => "hoge"
end
end
//}...

REXML::Attribute#namespace(arg = nil) -> String | nil (9400.0)

属性の名前空間の URI を返します。

...の URI を返します。

URI が定義されていない場合は nil を返します。

@param arg この値を指定すると、その属性の名前空間でなく、arg という名前空間
の URI が返されます。
通常は省略します。

//emlist[][ruby]{
require 'r...
...exml/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.com/ns"
//}...

REXML::Attributes#get_attribute_ns(namespace, name) -> REXML::Attribute | nil (9400.0)

namespace と name で特定される属性を返します。

...namespace と name で特定される属性を返します。

names
pace で名前空間を、 name で prefix を含まない属性名を
指定します。

指定された属性が存在しない場合は nil を返します。

XML プロセッサが prefix を置き換えてしまった場合...
...使うことで属性を正しく指定することができます。

@param namespace 名前空間(URI, 文字列)
@param name 属性名(文字列)

//emlist[][ruby]{
require 'rexml/document'

doc = REXML::Document.new(<<-EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://exampl...
...ot/a").first

a.attributes.get_attribute_ns("", "att") # => att='&lt;'
a.attributes.get_attribute_ns("http://example.org/foo", "att") # => foo:att='1'
a.attributes.get_attribute_ns("http://example.org/baz", "att") # => nil
a.attributes.get_attribute_ns("http://example.org/foo", "attt") # => nil
//}...

REXML::Attributes#namespaces -> { String => String } (9400.0)

self の中で宣言されている名前空間の集合を返します。

...lf の中で宣言されている名前空間の集合を返します。

返り値は名前空間の prefix をキーとし、URI を値とする
Hash を返します。

//emlist[][ruby]{
require 'rexml/document'

doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.org/foo"
xmln...
...s:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='&lt;'/>
</root>
EOS
a = doc.get_elements("/root/a").first

p doc.root.attributes.namespaces
# => {"foo"=>"http://example.org/foo", "bar"=>"http://example.org/bar"}
p a.attributes.namespaces
# => {}
//}...

絞り込み条件を変える

<< 1 2 3 ... > >>