るりまサーチ

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

別のキーワード

  1. _builtin ==
  2. openssl ==
  3. rexml/document ==
  4. matrix ==
  5. == _builtin

ライブラリ

キーワード

検索結果

Symbol#==(other) -> true | false (18113.0)

other が同じシンボルの時に真を返します。 そうでない場合は偽を返します。

...other が同じシンボルの時に真を返します。
そうでない場合は偽を返します。

@param other 比較対象のシンボルを指定します。

例:

:aaa == :aaa #=> true
:aaa == :xxx #=> false...

Symbol#id2name -> String (7.0)

シンボルに対応する文字列を返します。

...シンボルに対応する文字列を返します。

逆に、文字列に対応するシンボルを得るには
String#intern を使います。

p :foo.id2name # => "foo"
p :foo.id2name.intern == :foo # => true

@see String#intern...
...シンボルに対応する文字列を返します。

逆に、文字列に対応するシンボルを得るには
String#intern を使います。

p :foo.id2name # => "foo"
p :foo.id2name.intern == :foo # => true

@see String#intern
@see Symbol#name...

Symbol#to_s -> String (7.0)

シンボルに対応する文字列を返します。

...シンボルに対応する文字列を返します。

逆に、文字列に対応するシンボルを得るには
String#intern を使います。

p :foo.id2name # => "foo"
p :foo.id2name.intern == :foo # => true

@see String#intern...
...シンボルに対応する文字列を返します。

逆に、文字列に対応するシンボルを得るには
String#intern を使います。

p :foo.id2name # => "foo"
p :foo.id2name.intern == :foo # => true

@see String#intern
@see Symbol#name...