るりまサーチ

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

別のキーワード

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

検索結果

<< 1 2 > >>

MiniTest::Spec.before(type = :each) { ... } -> Proc (21201.0)

各テストの前に実行するブロックを登録します。

...各テストの前に実行するブロックを登録します。

@param type :each を指定することができます。

@raise RuntimeError type に :each 以外を指定すると発生します。...

REXML::Parent#insert_before(child1, child2) -> self (12401.0)

child2 を child1 で指定したノードの前に挿入します。

...child2 を child1 で指定したノードの前に挿入します。

child1 が REXML::Child のインスタンスであるならば、その
子ノードの前に挿入されます。
child1 が 文字列であるならば、XPath で場所を指定します。
具体的には REXML::XPath.first(...
...self, child1) で特定されるノードの
前に挿入されます。

挿入されるノード(child2)の親は self に変更されます。

@param child1 挿入場所の指定
@param child2 挿入されるノード...

Enumerable#slice_when {|elt_before, elt_after| bool } -> Enumerator (12361.0)

要素を前から順にブロックで評価し、その結果によって要素をチャンクに分け た(グループ化した)要素を持つEnumerator を返します。

...elt_before、elt_after に渡し、ブロックの
評価値が真になる所でチャンクを区切ります。

ブロックは self の長さ - 1 回呼び出されます。

@return チャンクごとの配列をブロックパラメータに渡す Enumerator
を返します。each...
...ドは以下のように呼び出します。
//emlist{
enum.slice_when { |elt_before, elt_after| bool }.each { |ary| ... }
//}
to_a や map などのその他の Enumerable モジュールのメソッ
ドも有用です。

//emlist[例][ruby]{
# 1ずつ増加する部分配列ご...
...[1,2,4,9,10,11,12,15,16,19,20,21]
b = a.slice_when {|i, j| i+1 != j }
p b.to_a # => [[1, 2], [4], [9, 10, 11, 12], [15, 16], [19, 20, 21]]
c = b.map {|a| a.length < 3 ? a : "#{a.first}-#{a.last}" }
p c # => [[1, 2], [4], "9-12", [15, 16], "19-21"]
d = c.join(",")
p d # => "1,2,4,9-12,15,16,19-21"...

Enumerable#chunk_while {|elt_before, elt_after| ... } -> Enumerator (12349.0)

要素を前から順にブロックで評価し、その結果によって要素をチャンクに分け た(グループ化した)要素を持つEnumerator を返します。

...elt_before、elt_after に渡し、ブロックの
評価値が偽になる所でチャンクを区切ります。

ブロックは self の長さ - 1 回呼び出されます。

@return チャンクごとの配列をブロックパラメータに渡す Enumerator
を返します。each...
...ドは以下のように呼び出します。
//emlist{
enum.chunk_while { |elt_before, elt_after| bool }.each { |ary| ... }
//}
to_a や map などのその他の Enumerable モジュールのメソッ
ドも有用です。

//emlist[例][ruby]{
# 1ずつ増加する部分配列...
...[1,2,4,9,10,11,12,15,16,19,20,21]
b = a.chunk_while {|i, j| i+1 == j }
p b.to_a # => [[1, 2], [4], [9, 10, 11, 12], [15, 16], [19, 20, 21]]
c = b.map {|a| a.length < 3 ? a : "#{a.first}-#{a.last}" }
p c # => [[1, 2], [4], "9-12", [15, 16], "19-21"]
d = c.join(",")
p d # => "1,2,4,9-12,15,16,19-21"...

Enumerator::Lazy#slice_when {|elt_before, elt_after| bool } -> Enumerator::Lazy (12325.0)

Enumerable#slice_when と同じですが、配列ではなく Enumerator::Lazy を返します。

...erable#slice_when と同じですが、配列ではなく Enumerator::Lazy を返します。

//emlist[例][ruby]{
1.step.lazy.slice_when { |i, j| (i + j) % 5 == 0 }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x00007fce84118348>:each>>

1.step.lazy.slice_when { |i, j| (i + j) %...
...5 == 0 }.take(5).force
# => [[1, 2], [3, 4, 5, 6, 7], [8, 9, 10, 11, 12], [13, 14, 15, 16, 17], [18, 19, 20, 21, 22]]
//}

@see Enumerable#slice_when...

絞り込み条件を変える

Enumerator::Lazy#chunk_while {|elt_before, elt_after| ... } -> Enumerator::Lazy (12301.0)

Enumerable#chunk_while と同じですが、Enumerator ではなく Enumerator::Lazy を返します。

...Enumerable#chunk_while と同じですが、Enumerator ではなく Enumerator::Lazy を返します。

@raise ArgumentError ブロックを指定しなかった場合に発生します。...

Gem::Commands::WhichCommand (12012.0)

指定された Gem パッケージに含まれるライブラリのパスを見つけるためのクラスです。

...けるためのクラスです。

Usage: gem which FILE [...] [options]
Options:
-a, --[no-]all show all matching files
-g, --[no-]gems-first search gems before non-gems
Common Options:
-h, --help このコマンドの...
...ヘルプを表示します
-V, --[no-]verbose 表示を詳細にします
-q, --quiet 静かに実行します
--config-file FILE 指定された設定ファイルを使用します
--backtrace バック...
...Ruby 自体のデバッグオプションを有効にします
Arguments:
FILE Gem パッケージ名を指定します
Summary:
指定された Gem パッケージのライブラリのある場所を表示します
Defaults:
--no-gems-first --no-all...

Net::POP3.auth_only(address, port = nil, account, password, isapop=false) (6206.0)

POP セッションを開き、認証だけを行って接続を切ります。

...ョンを開き、認証だけを行って接続を切ります。

主に POP before SMTP のために用意されています。


使用例:

require 'net/pop'

Net::POP3.auth_only('pop.example.com', nil, # using default port (110)
'YourAccount', 'YourPassword')

@pa...
...ram password パスワード文字列
@param isapop 真でAPOPを利用します

@raise Net::POPAuthenticationError 認証に失敗した、もしくはAPOPを利用しようとしたがサーバがAPOPを提供していない場合に発生します
@raise Net::POPError サーバが認証失敗以...
...外のエラーを報告した場合に発生します
@raise Net::POPBadResponse サーバからの応答がプロトコル上不正であった場合に発生します...

net/imap (6012.0)

このライブラリは Internet Message Access Protocol (IMAP) の クライアントライブラリです。2060 を元に 実装されています。

...リは Internet Message Access Protocol (IMAP) の
クライアントライブラリです。2060 を元に
実装されています。

=== IMAP の概要

I
MAPを利用するには、まずサーバに接続し、
Net::IMAP#authenticate もしくは
Net::IMAP#login で認証します。
I
MAP で...
...
Unixシステムでは、ディレクトリ階層上の
ファイルを個々のメールボックスとみなして実装されることが多いです。

メールボックス内のメッセージ(メール)を処理する場合、
まず Net::IMAP#select もしくは
Net::IMAP#examine で処...
..."Mail/sent-apr03" へ移動させる

require 'net/imap'

i
map = Net::IMAP.new('mail.example.com')
i
map.authenticate('LOGIN', 'joe_user', 'joes_password')
i
map.select('Mail/sent-mail')
i
f not imap.list('Mail/', 'sent-apr03')
i
map.create('Mail/sent-apr03')
end
i
map.search(["BEFORE",...

Encoding::Converter.new(convpath) -> Encoding::Converter (3206.0)

Encoding::Converter オブジェクトを作成します。

...Encoding::Converter オブジェクトを作成します。

@param source_encoding 変換元のエンコーディング
@param destination_encoding 変換先のエンコーディング
@param options 変換の詳細を指定する定数やハッシュ
@param convpath 変換経路の配列

options...
...は String#encode でのハッシュオプションに加えて、以下の定数が利用可能です。

* Encoding::Converter::INVALID_REPLACE
* Encoding::Converter::UNDEF_REPLACE
* Encoding::Converter::UNDEF_HEX_CHARREF
* Encoding::Converter::UNIVERSAL_NEWLINE_DECORATOR
* Encoding::Con...
...line conversion are inserted last.
ec = Encoding::Converter.new("UTF-16BE", "UTF-8", :universal_newline => true)
p ec.convpath #=> [[#<Encoding:UTF-16BE>, #<Encoding:UTF-8>],
# "universal_newline"]

# But, if the last encoding is ASCII incompatible,
# decorators are inserted before...

絞り込み条件を変える

Module#ruby2_keywords(method_name, ...) -> nil (218.0)

For the given method names, marks the method as passing keywords through a normal argument splat. This should only be called on methods that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the method such that if the method is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the method to other methods.

...the given method names, marks the method as passing keywords through
a normal argument splat. This should only be called on methods that
accept an argument splat (`*args`) but not explicit keywords or a
keyword splat. It marks the method such that if the method is called
with keyword arguments, th...
...e final hash argument is marked with a special
flag such that if it is the final element of a normal argument splat to
another method call, and that method call does not include explicit
keywords or a keyword splat, the final element is interpreted as
keywords. In other words, keywords will be passe...
...d through the method to
other methods.

This should only be used for methods that delegate keywords to another
method, and only for backwards compatibility with Ruby versions before
2.7.

This method will probably be removed at some point, as it exists only
for backwards compatibility. As it does no...
<< 1 2 > >>