るりまサーチ

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

別のキーワード

  1. string b
  2. _builtin b
  3. b
  4. b string
  5. b _builtin

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

Comparable#<(other) -> bool (21225.0)

比較演算子 <=> をもとにオブジェクト同士を比較します。 <=> が負の整数を返した場合に、true を返します。 それ以外の整数を返した場合に、false を返します。

... <=> をもとにオブジェクト同士を比較します。
<
=> が負の整数を返した場合に、true を返します。
それ以外の整数を返した場合に、false を返します。

@
param other 自身と比較したいオブジェクトを指定します。
@
raise ArgumentError <...
...=> が nil を返したときに発生します。

//emlist[例][ruby]{
1 < 1 # => false
1 < 2 # => true
//}...

Module#<(other) -> bool | nil (18249.0)

比較演算子。self が other の子孫である場合、 true を返します。 self が other の先祖か同一のクラス/モジュールである場合、false を返します。

...す。

@
param other 比較対象のモジュールやクラス

@
raise TypeError other がクラスやモジュールではない場合に発生します。

//emlist[例][ruby]{
module Foo
end
class Bar
include Foo
end
class Baz < Bar
end
class Qux
end
p Bar < Foo # => true
p Baz < Bar #...
...=> true
p Baz < Foo # => true
p Baz < Qux # => nil
p Baz > Qux # => nil

p Foo < Object.new # => in `<': compared with non class/module (TypeError)
//}...

Hash#<(other) -> bool (18243.0)

self が other のサブセットである場合に真を返します。

...サブセットである場合に真を返します。

@
param other 自身と比較したい Hash オブジェクトを指定します。

//emlist[例][ruby]{
h1 = {a:1, b:2}
h2 = {a:1, b:2, c:3}
h1 < h2 # => true
h2 < h1 # => false
h1 < h1 # => false
//}

@
see Hash#<=, Hash#>=, Hash#>...

Integer#<(other) -> bool (18225.0)

比較演算子。数値として小さいか判定します。

...比較演算子。数値として小さいか判定します。

@
param other 比較対象の数値
@
return self よりも other が大きい場合 true を返します。
そうでなければ false を返します。

//emlist[][ruby]{
1 < 1 # => false
1 < 2 # => true
//}...

Float#<(other) -> bool (18219.0)

比較演算子。数値として小さいか判定します。

...数値として小さいか判定します。

@
param other 比較対象の数値
@
return self よりも other が大きい場合 true を返します。
そうでなければ false を返します。

//emlist[例][ruby]{
3.14 < 3.1415 # => true
3.14 <= 3.1415 # => true
//}...

絞り込み条件を変える

Complex#<(other) -> bool (18217.0)

@undef

...
@
undef...

Fixnum#<(other) -> bool (18213.0)

比較演算子。数値として小さいか判定します。

...比較演算子。数値として小さいか判定します。

@
param other 比較対象の数値
@
return self よりも other が大きい場合 true を返します。
そうでなければ false を返します。...

Bignum#<<(bits) -> Fixnum | Bignum (9325.0)

シフト演算子。bits だけビットを左にシフトします。

...シフト演算子。bits だけビットを左にシフトします。

@
param bits シフトさせるビット数

printf("%#b\n", 0b0101 << 1) #=> 0b1010
p -1 << 1 #=> -2...

REXML::Attributes#get_attribute(name) -> Attribute | nil (9225.0)

name という名前の属性を取得します。

...返します。

@
param name 属性名(文字列)
@
see REXML::Attributes#[]

//emlist[][ruby]{
require 'rexml/document'

doc = REXML::Document.new(<<-EOS)
<
root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<
a foo:att='1' bar:att='2' att='&lt;'/>
<
/root>
EOS
a = doc...
....get_elements("/root/a").first

a.attributes.get_attribute("att") # => att='&lt;'
a.attributes.get_attribute("foo:att") # => foo:att='1'
//}...

REXML::Attributes#get_attribute_ns(namespace, name) -> REXML::Attribute | nil (9225.0)

namespace と name で特定される属性を返します。

...す。

@
param namespace 名前空間(URI, 文字列)
@
param name 属性名(文字列)

//emlist[][ruby]{
require 'rexml/document'

doc = REXML::Document.new(<<-EOS)
<
root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<
a foo:att='1' bar:att='2' att='&lt;'/>
<
/root>
E...
...get_elements("/root/a").first

a.attributes.get_attribute_ns("", "att") # => att='&lt;'
a.attributes.get_attribute_ns("http://example.org/foo", "att") # => foo:att='1'
a.attributes.get_attribute_ns("http://example.org/baz", "att") # => nil
a.attributes.get_attribute_ns("http://example.org/foo", "att...

絞り込み条件を変える

OpenSSL::BN#<<(other) -> OpenSSL::BN (9219.0)

自身を other ビット左シフトした値を返します。

...自身を other ビット左シフトした値を返します。

//emlist[][ruby]{
b
n = 1.to_bn
pp bn << 1 # => #<OpenSSL::BN 2>
pp bn # => #<OpenSSL::BN 1>
//}

@
param other シフトするビット数
@
raise OpenSSL::BNError 計算時エラー
@
see OpenSSL::BN#lshift!...
<< 1 2 3 ... > >>