るりまサーチ

最速Rubyリファレンスマニュアル検索!
756件ヒット [1-100件を表示] (0.043秒)

別のキーワード

  1. kernel require
  2. getoptlong require_order
  3. rubygems/custom_require require
  4. irb/ext/use-loader irb_require
  5. require execute

ライブラリ

キーワード

検索結果

<< 1 2 3 ... > >>

WEBrick::HTTPUtils::FormData#name -> String | nil (18238.0)

フォームデータの name 属性を文字列で表すアクセサです。

...フォームデータの name 属性を文字列で表すアクセサです。

@param value フォームデータの name 属性を文字列で指定します。

例:

require
"webrick/cgi"
class MyCGI < WEBrick::CGI
def do_GET(req, res)
p req.query['q'].name #=> "q"
end
end
MyCG...

Rake::PackageTask#name -> String (18215.0)

バージョン情報を含まないパッケージの名前を返します。

...バージョン情報を含まないパッケージの名前を返します。

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

Rake::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.name # => "sample"
end
//}...

Addrinfo#getnameinfo(flags=0) -> [String, String] (6309.0)

ノード名とサービスを文字列の配列で返します。

...ビット OR を渡します。

require
'socket'

Addrinfo.tcp("127.0.0.1", 80).getnameinfo
#=> ["localhost", "www"]
Addrinfo.tcp("127.0.0.1", 80).getnameinfo(Socket::NI_NUMERICSERV)
#=> ["localhost", "80"]

@param flags フラグ
@raise SocketError getnameinfo(3) がエラーを起こし...
...た場合に生じる例外

@see Socket.getnameinfo...

REXML::Attributes#namespaces -> { String => String } (6309.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='&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
# => {}
//}...

REXML::Element#namespaces -> {String => String} (6309.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#to_string -> String (6231.0)

"name='value'" という形式の文字列を返します。

..."name='value'" という形式の文字列を返します。

//emlist[][ruby]{
require
'rexml/document'
e = REXML::Element.new("el")
e.add_attribute("ns:r", "rval")
p e.attributes.get_attribute("r").to_string # => "ns:r='rval'"
//}...

OpenSSL::ASN1::ObjectId#short_name -> String | nil (6226.0)

オブジェクト識別子に対応する short name を返します。

...オブジェクト識別子に対応する short name を返します。

例:
require
"openssl"
oid = OpenSSL::ASN1::ObjectId.new("subjectAltName")
p oid.sn #=> "subjectAltName"

@see OpenSSL::ASN1::ObjectId#ln...

OptionParser#program_name -> String (6215.0)

プログラムの名前を文字列で返します。

...字列で返します。

デフォルトは $0 が使われます。

@return プログラムの名前を文字列で返します。

//emlist[例][ruby]{
require
"optparse"

OptionParser.new do |opts|
p $0 # => /path/to/filename.rb
p opts.program_name # => filename
end
//}...

Addrinfo#canonname -> String|nil (6208.0)

カノニカル名を文字列で返します。

...CANONINAME
を指定した場合にセットされます。

require
'socket'

list = Addrinfo.getaddrinfo("www.ruby-lang.org", 80, :INET, :STREAM, nil, Socket::AI_CANONNAME)
p list[0] #=> #<Addrinfo: 221.186.184.68:80 TCP carbon.ruby-lang.org (www.ruby-lang.org:80)>
p list[0].canonname #=>...
<< 1 2 3 ... > >>