るりまサーチ

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

別のキーワード

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

クラス

キーワード

検索結果

<< < 1 2 3 4 5 ... > >>

JSON::State#check_circular? -> bool (12201.0)

循環参照のチェックを行う場合は、真を返します。 そうでない場合は偽を返します。

...環参照のチェックを行う場合は、真を返します。
そうでない場合は偽を返します。

//emlist[例 ネストをチェックするケース][ruby]{
require "json"

a = [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[0]]...
...]]]]]]
s = JSON.state.new
begin
JSON.generate(a, s)
rescue JSON::NestingError => e
[e, s.max_nesting, s.check_circular?] # => [#<JSON::NestingError: nesting of 100 is too deep>, 100, true]
end
//}

//emlist[例 ネストをチェックしないケース][ruby]{
require "json"

a = [[[[[[[[[[[[[[...
...]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
s2 = JSON.state.new(max_nesting: 0)
json = JSON.generate(a, s2)
[json, s2.max_nesting, s2.check_circular?] # => ["[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[...

Method#source_location -> [String, Integer] | nil (12201.0)

ソースコードのファイル名と行番号を配列で返します。

...nil を返します。

@see Proc#source_location

//emlist[例][ruby]{
# ------- /tmp/foo.rb ---------
class Foo
def foo; end
end
# ----- end of /tmp/foo.rb ----

require '/tmp/foo'

m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m.source_location # => ["/tmp/foo.rb", 2]

method(:puts).source_...
...location # => nil
//}...

Module#const_source_location(name, inherited = true) -> [String, Integer] (12201.0)

name で指定した定数の定義を含むソースコードのファイル名と行番号を配列で返します。

...スコードのファイル名と行番号を配列で返します。

@param name Symbol,String で定数の名前を指定します。
@param inherited true を指定するとスーパークラスや include したモジュールで定義された定数が対象にはなります。false を指...
...nil を返します。
定数は見つかったがソースファイルが見つからなかった場合は空の配列を返します。

//emlist[例][ruby]{
# test.rb:
class A # line 1
C1 = 1
C2 = 2
end

module M # line 6
C3 = 3
end

class B < A # line 10
i
nclu...
...source_location('C4') # => ["test.rb", 12]
p B.const_source_location('C3') # => ["test.rb", 7]
p B.const_source_location('C1') # => ["test.rb", 2]

p B.const_source_location('C3', false) # => nil -- include したモジュールは検索しない

p A.const_source_l...

Net::IMAP#uid_search(keys, charset = nil) -> [Integer] (12201.0)

UID SEARCH コマンドを送り、条件に合うメッセージの UID を配列で返します。

...UID SEARCH コマンドを送り、条件に合うメッセージの UID
を配列で返します。

Net::IMAP#examine もしくは Net::IMAP#select で
指定したメールボックスを検索対象とします。

検索の条件は key に文字列の1次元配列もしくは文字列で渡...
...す。
詳しくは 2060 の 6.4.4 を見てください。

例:
p imap.uid_search(["SUBJECT", "hello"])
#=> [1, 6, 7, 8]
p imap.uid_search(["SUBJECT", "hello", "FROM", "foo@example.com"])
#=> [6, 7]
p imap.uid_search('SUBJECT "hello"')
#=> [1, 6, 7, 8]

@param key 検索キー(文字...
...列の配列もしくは文字列)
@param charset 検索に用いるcharset
@see Net::IMAP#uid_search...

Net::SMTP#rcptto_list(to_addrs) { ... } -> object (12201.0)

RCPTTO コマンドを to_addrs のすべてのメールアドレスに対して送ります。

...RCPTTO コマンドを to_addrs のすべてのメールアドレスに対して送ります。

コマンドを送った後、ブロックを呼び出します。
このメソッドの返り値はブロックの返り値になります。

通常は Net::SMTP#send_message, Net::SMTP#open_message_st...
...ream で
RC
PTTO が送られるため利用する必要はないはずです。

@param to_addrs 送信先メールアドレスの配列...

絞り込み条件を変える

Proc#source_location -> [String, Integer] | nil (12201.0)

ソースコードのファイル名と行番号を配列で返します。

...nil を返します。


//emlist[例][ruby]{
# /path/to/target.rb を実行
proc {}.source_location # => ["/path/to/target.rb", 1]
proc {}.source_location # => ["/path/to/target.rb", 2]
(eval "proc {}").source_location # => ["(eval)", 1]
method(:p).to_proc.source_location #...
...=> nil
//}

@see Method#source_location...

URI::Generic#hierarchical? -> bool (12201.0)

自身に path が設定されているなら true を返します。そうでない場合は false を返します。

自身に path が設定されているなら true を返します。そうでない場合は false を返します。

UnboundMethod#source_location -> [String, Integer] | nil (12201.0)

ソースコードのファイル名と行番号を配列で返します。

...nil を返します。

//emlist[例][ruby]{
require 'time'

Time.instance_method(:zone).source_location # => nil
Time.instance_method(:httpdate).source_location # => ["/Users/user/.rbenv/versions/2.4.3/lib/ruby/2.4.0/time.rb", 654]
//}

@see Proc#source_location, Method#source_location...

Gem::SourceIndex#find_name(gem_name, version_requirement = Gem::Requirement.default) -> Gem::Specification (12101.0)

短い名前で正確にマッチする Gem を返します。

...短い名前で正確にマッチする Gem を返します。

@param gem_name Gem の名前を指定します。

@param version_requirement

@see Gem::Requirement...

Gem::SourceIndex#load_gems_in(*spec_dirs) -> self (12101.0)

引数で与えられたディレクトリに含まれる gemspec から自身を再構築して返します。

...引数で与えられたディレクトリに含まれる gemspec から自身を再構築して返します。

@param spec_dirs gemspec の含まれているディレクトリを複数指定します。...

絞り込み条件を変える

<< < 1 2 3 4 5 ... > >>