るりまサーチ (Ruby 2.3.0)

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

別のキーワード

  1. string []=
  2. string []
  3. string slice
  4. string slice!
  5. string gsub

クラス

キーワード

検索結果

URI::MailTo#to_mailtext -> String (316.0)

URI オブジェクトからメールテキスト文字列を生成します。

...
URI
オブジェクトからメールテキスト文字列を生成します。

例:
require 'uri'
p mailto = URI.parse("mailto:ruby-list@ruby-lang.org?subject=subscribe&cc=myaddr")
print mailto.to_mailtext

=> #<URI::MailTo:0x20104a0e URL:mailto:ruby-list@ruby-lang.org?subject=subscribe&...

URI::MailTo#to_rfc822text -> String (316.0)

URI オブジェクトからメールテキスト文字列を生成します。

...
URI
オブジェクトからメールテキスト文字列を生成します。

例:
require 'uri'
p mailto = URI.parse("mailto:ruby-list@ruby-lang.org?subject=subscribe&cc=myaddr")
print mailto.to_mailtext

=> #<URI::MailTo:0x20104a0e URL:mailto:ruby-list@ruby-lang.org?subject=subscribe&...

URI::FTP#typecode -> String | nil (313.0)

ファイル転送のタイプを文字列で返します。"a" はテキスト、"i" はバイナリ、"d" はディレクトリを表します。 設定されていない場合は nil を返します。

ファイル転送のタイプを文字列で返します。"a" はテキスト、"i" はバイナリ、"d" はディレクトリを表します。
設定されていない場合は nil を返します。

URI::Generic#fragment -> String | nil (313.0)

自身の fragment を文字列で返します。設定されていない場合は nil を返します。

...自身の fragment を文字列で返します。設定されていない場合は nil を返します。

例:
require 'uri'
u = URI.parse('http://example.com/#frgmt')
p u.fragment #=> "frgmt"...

URI::Generic#host -> String | nil (313.0)

自身の host を文字列で返します。設定されていない場合は nil を返します。

...自身の host を文字列で返します。設定されていない場合は nil を返します。

@see URI::Generic#hostname...

絞り込み条件を変える

URI::Generic#hostname -> String | nil (313.0)

自身の hostname を文字列で返します。また、URI::Generic#host が設 定されていない場合は nil を返します。

...URI::Generic#host が設
定されていない場合は nil を返します。

このメソッドは URI::Generic#host に IPv6 アドレスが設定されていた
場合はブラケットを削除した文字列を返しますがそれ以外は同じ文字列を返し
ます。

require 'uri'...
...u = URI("http://[::1]/bar")
p u.hostname # => "::1"
p u.host # => "[::1]"...

URI::Generic#normalize! -> String | nil (313.0)

URI オブジェクトを正規化して返します。ホスト名を小文字にし、パスと 構成要素がなければ '/' をセットします。

...
URI
オブジェクトを正規化して返します。ホスト名を小文字にし、パスと
構成要素がなければ '/' をセットします。

例:
require 'uri'
u = URI.parse('http://Example.Com')
p u.to_s #=> "http://Example.Com"
p u.normalize.to_s...

URI::Generic#opaque -> String | nil (313.0)

自身の opaque を文字列で返します。設定されていない場合は nil を返します。

...列で返します。設定されていない場合は nil を返します。

例:
require 'uri'
p URI.parse('http://example.com/').opaque #=> nil
p URI.parse('mailto:nospam@localhost').opaque #=> "nospam@localhost"
p URI.parse('urn:ietf:rfc:1149').opaque #=> "ietf:rfc:1149"...

URI::Generic#password -> String | nil (313.0)

自身の password を文字列で返します。設定されていない場合は nil を返します。

自身の password を文字列で返します。設定されていない場合は nil を返します。

URI::Generic#path -> String | nil (313.0)

自身の path を文字列で返します。設定されていない場合は nil を返します。

...します。

require 'uri'
p URI.parse('http://example.com/hoge').path #=> "/hoge"
p URI.parse('http://example.com').path #=> ""
p URI.parse('mailto:nospam@localhost').path #=> nil
p URI('ftp://example.com/foo').path #=> 'foo'
p URI('ftp://example.com/%2Ffoo')....

絞り込み条件を変える

URI::Generic#port -> String | nil (313.0)

自身の port を文字列で返します。設定されていない場合は nil を返します。

自身の port を文字列で返します。設定されていない場合は nil を返します。

URI::Generic#query -> String | nil (313.0)

自身の query を文字列で返します。設定されていない場合は nil を返します。

...自身の query を文字列で返します。設定されていない場合は nil を返します。

例:
require 'uri'
p URI.parse('http://example.com/?hoge').query #=> "hoge"...

URI::Generic#registry -> String | nil (313.0)

自身の registry を文字列で返します。設定されていない場合は nil を返します。

自身の registry を文字列で返します。設定されていない場合は nil を返します。

URI::Generic#scheme -> String | nil (313.0)

自身の scheme を文字列で返します。設定されていない場合は nil を返します。

自身の scheme を文字列で返します。設定されていない場合は nil を返します。

URI::Generic#select(*components) -> [String] (313.0)

指定された components に対応する構成要素を文字列の配列として返します。

...字列の配列として返します。

@param components 構成要素名をシンボルで指定します。

例:
require 'uri'

uri
= URI.parse('http://myuser:mypass@my.example.com/test.rbx')
p uri.select(:userinfo, :host, :path)
# => ["myuser:mypass", "my.example.com", "/test.rbx"]...

絞り込み条件を変える

URI::Generic#to_s -> String (313.0)

自身が表す URI を文字列として返します。

...自身が表す URI を文字列として返します。

例:
require 'uri'
p URI.parse('http://example.com/').to_s #=> "http://example.com/"...

URI::Generic#user -> String | nil (313.0)

自身の userinfo を文字列で返します。

自身の userinfo を文字列で返します。

userinfo が「username:password」の形式である場合は、username 部を返します。
設定されていない場合は nil を返します。

URI::Generic#userinfo -> String | nil (313.0)

自身の userinfo を "username:password" という形式の文字列で返します。 設定されていない場合は nil を返します。

自身の userinfo を "username:password" という形式の文字列で返します。
設定されていない場合は nil を返します。

URI::HTTP#request_uri -> String (313.0)

自身の「path + '?' + query」を文字列で返します。 query が nil である場合は、自身の path を返します。

...す。
query が nil である場合は、自身の path を返します。

path が空である場合には、path は「'/'」であるとします。

例:
require 'uri'
u = URI.parse("http://example.com/search?q=xxx")
p u.request_uri #=> "/search?q=xxx"...

URI::LDAP#attributes -> String (313.0)

自身の Attribute を文字列で返します。

自身の Attribute を文字列で返します。

絞り込み条件を変える

URI::LDAP#dn -> String (313.0)

自身の Distinguished Name を文字列で返します。

自身の Distinguished Name を文字列で返します。

URI::LDAP#extensions -> String (313.0)

自身の extensions を文字列で返します。

自身の extensions を文字列で返します。

URI::LDAP#filter -> String (313.0)

自身の filter を文字列で返します。

自身の filter を文字列で返します。

URI::LDAP#scope -> String (313.0)

自身の Scope を文字列で返します。

自身の Scope を文字列で返します。

URI::MailTo#headers -> [[String]] (313.0)

自身のヘッダーを文字列の配列の配列として設定します。

...自身のヘッダーを文字列の配列の配列として設定します。

例:
require 'uri'
m = URI.parse("mailto:ruby-list@ruby-lang.org?subject=subscribe&cc=myaddr")
p m.headers #=> [["subject", "subscribe"], ["cc", "myaddr"]]...

絞り込み条件を変える

URI::MailTo#to -> String (313.0)

自身の e-mail アドレスを文字列で返します。

...自身の e-mail アドレスを文字列で返します。

例:
require 'uri'
p URI.parse("mailto:nospam@example.com").to #=> "nospam@example.com"...

URI::Generic#normalize -> URI::Generic (13.0)

URI オブジェクトを正規化して返します。ホスト名を小文字にし、パスと 構成要素がなければ '/' をセットします。

...
URI
オブジェクトを正規化して返します。ホスト名を小文字にし、パスと
構成要素がなければ '/' をセットします。

例:
require 'uri'
u = URI.parse('http://Example.Com')
p u.to_s #=> "http://Example.Com"
p u.normalize.to_s...