るりまサーチ

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

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

モジュール

オブジェクト

検索結果

<< 1 2 3 ... > >>

main (38030.0)

トップレベルでの self を表すオブジェクトです。

...トップレベルでの self を表すオブジェクトです。

main
では参照できない事に注意してください。トップレベルで self から参照してください。

トップレベルで定義したメソッドは Object の private インスタンスメソッドと
して...
...ップレベルで定義したメソッドの確認][ruby]{
basic_private_methods = private_methods(false)
basic_public_methods = public_methods(false)
private def explicit_private_method
end

# トップレベルで定義したメソッドは main オブジェクトの private メソッドと し...
...method
end

public def explicit_public_method
end

# main オブジェクトで独自定義した private method のみを取得する
p private_methods(false) - basic_private_methods
# => [:explicit_private_method, :implicit_private_method]

# main オブジェクトで独自定義した public met...

main.using(module) -> self (21012.0)

引数で指定したモジュールで定義された拡張を有効にします。

...範囲については以下を参照してください。

* https://docs.ruby-lang.org/en/master/syntax/refinements_rdoc.html#label-Scope

@param module 有効にするモジュールを指定します。

//emlist[例][ruby]{
module Sloth
refine String do
def downcase
self
end
e...

main.include(*modules) -> self (21006.0)

引数 modules で指定したモジュールを後ろから順番に Object にインクルードします。

...odules Module のインスタンス( Enumerable など)を指定します。

@raise ArgumentError 継承関係が循環してしまうような include を行った場
合に発生します。

//emlist[例:][ruby]{
include Math

hypot(3, 4) # => 5.0
//}

@see Module#include...

Net::HTTPHeader#main_type -> String|nil (6113.0)

"text/html" における "text" のようなタイプを表す 文字列を返します。

...タイプを表す
文字列を返します。

Content-Type: ヘッダフィールドが存在しない場合には nil を返します。

//emlist[例][ruby]{
require 'net/http'

uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.get_response(uri)
res.main_type # => "text"
//}...

BigDecimal#remainder(n) -> BigDecimal (6106.0)

self を n で割った余りを返します。

...す。

@param n self を割る数を指定します。

//emlist[][ruby]{
require 'bigdecimal'
x = BigDecimal((2**100).to_s)
x.remainder(3).to_i # => 1
(-x).remainder(3).to_i # => -1
x.remainder(-3).to_i # => 1
(-x).remainder(-3).to_i # => -1
//}

戻り値は self と同じ符号になり...
...ます。これは BigDecimal#% とは異な
る点に注意してください。詳細は Numeric#%、
Numeric#remainder を参照して下さい。...

絞り込み条件を変える

Integer#remainder(other) -> Numeric (6106.0)

self を other で割った余り r を返します。

...す。

@param other self を割る数。

//emlist[][ruby]{
5.remainder(3) # => 2
-5.remainder(3) # => -2
5.remainder(-3) # => 2
-5.remainder(-3) # => -2

-1234567890987654321.remainder(13731) # => -6966
-1234567890987654321.remainder(13731.24) # => -9906.22531493148
//}

@see Inte...

Numeric#remainder(other) -> Numeric (6106.0)

self を other で割った余り r を返します。

...other 自身を割る数を指定します。

//emlist[例][ruby]{
p 13.remainder(4) #=> 1
p (11.5).remainder(3.5) #=> 1.0
p 13.remainder(-4) #=> 1
p (-13).remainder(4) #=> -1
p (-13).remainder(-4) #=> -1
p (-11).remainder(3.5) #=> -0.5
//}

@see Numeric#divmod, Numeric#modulo...

Resolv::DNS::Name#subdomain_of?(other) -> bool (6106.0)

other が self のサブドメインであるかどうかを返します。

...ます。

//emlist[][ruby]{
require "resolv"
domain = Resolv::DNS::Name.create("y.z")
p Resolv::DNS::Name.create("w.x.y.z").subdomain_of?(domain) #=> true
p Resolv::DNS::Name.create("x.y.z").subdomain_of?(domain) #=> true
p Resolv::DNS::Name.create("y.z").subdomain_of?(domain) #=> false
p Resolv::D...
...NS::Name.create("z").subdomain_of?(domain) #=> false
p Resolv::DNS::Name.create("x.y.z.").subdomain_of?(domain) #=> false
p Resolv::DNS::Name.create("w.z").subdomain_of?(domain) #=> false
//}...

ruby 1.6 feature (5221.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...ruby 1.6 feature
ruby
version 1.6 は安定版です。この版での変更はバグ修正がメイン
になります。

((<stable-snapshot|URL:ftp://ftp.netlab.co.jp/pub/lang/ruby/stable-snapshot.tar.gz>)) は、日々更新される安定版の最新ソースです。

== 1.6.8 (2002-12-24) ->...
...EWOULDBLOCK

=> ruby 1.6.7 (2002-03-01) [i586-linux]
Errno::EAGAIN
Errno::EWOULDBLOCK

=> ruby 1.6.8 (2002-12-24) [i586-linux]
Errno::EAGAIN
-:2: uninitialized constant EWOULDBLOCK at Errno (NameError)

=> ruby 1.6.8 (2003-02-13) [i...
...((<ruby-bugs-ja:PR#122>))

p(-1[-1])

=> ruby 1.6.5 (2001-09-19) [i586-linux]
1
=> ruby 1.6.5 (2001-11-01) [i586-linux]
1

: Numeric#remainder

((<ruby-bugs-ja:PR#110>))

p( 3.remainder(-3))
p(-3.remainder(3))

=> ruby 1.6.5...
<< 1 2 3 ... > >>