4件ヒット
[1-4件を表示]
(0.034秒)
別のキーワード
検索結果
先頭4件
-
Symbol
# ==(other) -> true | false (24325.0) -
other が同じシンボルの時に真を返します。 そうでない場合は偽を返します。
other が同じシンボルの時に真を返します。
そうでない場合は偽を返します。
@param other 比較対象のシンボルを指定します。
例:
:aaa == :aaa #=> true
:aaa == :xxx #=> false -
Symbol
# empty? -> bool (24022.0) -
自身が :"" (length が 0 のシンボル)かどうかを返します。
自身が :"" (length が 0 のシンボル)かどうかを返します。
:"".empty? #=> true
:foo.empty? #=> false
@see String#empty? -
Symbol
# id2name -> String (24022.0) -
シンボルに対応する文字列を返します。
シンボルに対応する文字列を返します。
逆に、文字列に対応するシンボルを得るには
String#intern を使います。
p :foo.id2name # => "foo"
p :foo.id2name.intern == :foo # => true
@see String#intern -
Symbol
# to _ s -> String (24022.0) -
シンボルに対応する文字列を返します。
シンボルに対応する文字列を返します。
逆に、文字列に対応するシンボルを得るには
String#intern を使います。
p :foo.id2name # => "foo"
p :foo.id2name.intern == :foo # => true
@see String#intern