るりまサーチ

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

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

CGI::HtmlExtension#base(href = "") -> String (18329.0)

base 要素を生成します。

...
base
要素を生成します。

@param href 文字列を指定します。属性をハッシュで指定することもできます。

例:
base
("http://www.example.com/cgi")
# => "<BASE HREF=\"http://www.example.com/cgi\">"...

OpenURI::Meta#base_uri -> URI (15425.0)

リソースの実際の URI を URI オブジェクトとして返します。 リダイレクトされた場合は、リダイレクトされた後のデータが存在する URI を返します。

...RI を URI オブジェクトとして返します。
リダイレクトされた場合は、リダイレクトされた後のデータが存在する URI を返します。

//emlist[例][ruby]{
r
equire 'open-uri'
open('http://www.ruby-lang.org/') {|f|
p f.base_uri
#=> #<URI::HTTP:0xb7043aa0 UR...
...L:http://www.ruby-lang.org/en/>
}
//}...
...際の URI を URI オブジェクトとして返します。
リダイレクトされた場合は、リダイレクトされた後のデータが存在する URI を返します。

//emlist[例][ruby]{
r
equire 'open-uri'
URL.open('http://www.ruby-lang.org/') {|f|
p f.base_uri
#=> #<URI::HTTP:0...
...xb7043aa0 URL:http://www.ruby-lang.org/en/>
}
//}...

SecureRandom.urlsafe_base64(n = nil, padding = false) -> String (12375.0)

ランダムで URL-safe な base64 文字列を生成して返します。

...ランダムで URL-safe な base64 文字列を生成して返します。

@param n 文字列の生成に使われるランダムネスのサイズを整数で指定します。
生成される文字列のサイズはn の約 4/3 倍になります。
nil を指定した場合 n...
...@param padding 真を指定すると '=' でパディングを行います。
偽を指定するとパディングを行いません。デフォルトは偽です。

@raise NotImplementedError 安全な乱数発生器が使えない場合に発生します。

r
equire 'securerand...
...p SecureRandom.urlsafe_base64 #=> "b4GOKm4pOYU_-BOXcrUGDg"
p SecureRandom.urlsafe_base64 #=> "UZLdOkzop70Ddx-IJR0ABg"
p SecureRandom.urlsafe_base64(nil, true) #=> "i0XQ-7gglIsHGV2_BNPrdQ=="
p SecureRandom.urlsafe_base64(nil, true) #=> "-M8rLhr7JEpJlqFGUMmOxg=="

@see SecureRandom.base64, 3...

RubyVM::InstructionSequence#base_label -> String (12319.0)

self が表す命令シーケンスの基本ラベルを返します。

...す。

例1:irb で実行した場合

iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.base_label
# => "<compiled>"

例2: RubyVM::InstructionSequence.compile_file を使用した場合

# /tmp/method.rb
def hello...
...lo, world"
end

# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.base_label # => "<main>"

例3:

# /tmp/method2.rb
def hello
puts "hello, world"
end

R
ubyVM::InstructionSequence.of(method(:hello)).base_label
# => "hello"

@see RubyVM::Instructio...

open-uri (12108.0)

http/ftp に簡単にアクセスするためのクラスです。 Kernel.#open を再定義します。

...スです。
Kernel.#open を再定義します。

=== 使用例

http/ftp の URL を、普通のファイルのように開けます。

r
equire 'open-uri'
open("http://www.ruby-lang.org/") {|f|
f.each_line {|line| p line}
}

開いたファイルオブジェクトは StringIO もしく...
...が OpenURI::Meta モジュールで拡張されていて、メタ情報を獲得する
メソッドが使えます。

r
equire 'open-uri'
open("http://www.ruby-lang.org/en") {|f|
f.each_line {|line| p line}
p f.base_uri # <URI::HTTP:0x40e6ef2 URL:http://www.ruby-lang.org/en/>...
...arset # "iso-8859-1"
p f.content_encoding # []
p f.last_modified # Thu Dec 05 02:45:02 UTC 2002
}

ハッシュ引数で、追加のヘッダフィールドを指定できます。

r
equire 'open-uri'
open("http://www.ruby-lang.org/en/",
"User-Agent" => "Ruby/#{RUBY_VER...
...用例

http/ftp の URL を、普通のファイルのように開けます。

r
equire 'open-uri'
URI.open("http://www.ruby-lang.org/") {|f|
f.each_line {|line| p line}
}

開いたファイルオブジェクトは StringIO もしくは Tempfile で
すが OpenURI::Meta モジュール...
...が使えます。

r
equire 'open-uri'
URI.open("http://www.ruby-lang.org/en") {|f|
f.each_line {|line| p line}
p f.base_uri # <URI::HTTP:0x40e6ef2 URL:http://www.ruby-lang.org/en/>
p f.content_type # "text/html"
p f.charset # "iso-8859-1"
p f.content_enc...
...ィールドを指定できます。

r
equire 'open-uri'
URI.open("http://www.ruby-lang.org/en/",
"User-Agent" => "Ruby/#{RUBY_VERSION}",
"From" => "foo@bar.invalid",
"Referer" => "http://www.ruby-lang.org/") {|f|
...
}

http_proxy や ftp_proxy などの環境変数は、デ...

絞り込み条件を変える

Base64.#strict_decode64(str) -> String (9328.0)

与えられた文字列を Base64 デコードしたデータを返します。

...与えられた文字列を Base64 デコードしたデータを返します。

このメソッドは 4648 に対応しています。


@param str Base64 デコードする文字列を指定します。

@raise ArgumentError 与えられた引数が Base64 エンコードされたデータとし...
...て正しい形式ではない場合に発生します。
例えば、アルファベットでない文字列や CR, LF などが含まれている場合にこの例外は発生します。...

SecureRandom.base64(n = nil) -> String (9323.0)

ランダムな base64 文字列を生成して返します。

...ランダムな base64 文字列を生成して返します。

@param n 文字列の生成に使われるランダムネスのサイズを整数で指定します。
生成される文字列のサイズではないことに注意して下さい。生成される文字列のサイズは...
...3 倍になります。nil を指定した場合 n として 16 が使われます。

@raise NotImplementedError 安全な乱数発生器が使えない場合に発生します。

r
equire 'securerandom'
p SecureRandom.base64(3) #=> "4pYO" (文字列のサイズは 3 でない)

@see 3548...

Base64.#strict_encode64(bin) -> String (9322.0)

与えられたデータを Base64 エンコードした文字列を返します。

...与えられたデータを Base64 エンコードした文字列を返します。

このメソッドは 4648 に対応しています。
改行コードを追加することはありません。

@param bin Base64 エンコードするデータを指定します。...

Thread::Backtrace::Location#base_label -> String (9307.0)

self が表すフレームの基本ラベルを返します。通常、 Thread::Backtrace::Location#label から修飾を取り除いたもので構成 されます。

...Thread::Backtrace::Location#label から修飾を取り除いたもので構成
されます。

//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end

Foo.new(0..2).locations.map do |call|
puts call.base_label...
...end

# => initialize
# new
# <main>
//}

@see Thread::Backtrace::Location#label...

Etc::SC_GETGR_R_SIZE_MAX -> Integer (9303.0)

Etc.#sysconf の引数に指定します。

Etc.#sysconf の引数に指定します。

詳細は sysconf(3) を参照してください。

絞り込み条件を変える

<< 1 2 3 ... > >>