358件ヒット
[1-100件を表示]
(0.169秒)
キーワード
- =~ (11)
- [] (55)
- capitalize (11)
-
define
_ singleton _ method (22) - downcase (8)
-
end
_ with? (5) - id2name (11)
- intern (11)
- length (11)
-
make
_ symlink (11) - match (11)
- name (4)
- next (11)
- size (11)
- slice (55)
-
start
_ with? (5) - succ (11)
- swapcase (8)
- symlink? (11)
-
to
_ h (6) -
to
_ proc (11) -
to
_ sym (22) -
transform
_ keys! (17) - upcase (8)
検索結果
先頭5件
-
Symbol
# to _ s -> String (21202.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 _ sym -> self (15302.0) -
self を返します。
...self を返します。
例:
:foo.intern # => :foo
@see String#intern... -
String
# to _ sym -> Symbol (12414.0) -
文字列に対応するシンボル値 Symbol を返します。
...ボル値 Symbol を返します。
なお、このメソッドの逆にシンボルに対応する文字列を得るには
Symbol#to_s または Symbol#id2name を使います。
シンボル文字列にはヌルキャラクタ("\0")、空の文字列の使用も可能です。
//emlist[例][rub......y]{
p "foo".intern # => :foo
p "foo".intern.to_s == "foo" # => true
//}... -
Symbol
# capitalize -> Symbol (9207.0) -
シンボルに対応する文字列の先頭の文字を大文字に、残りを小文字に変更した シンボルを返します。
...に、残りを小文字に変更した
シンボルを返します。
(self.to_s.capitalize.intern と同じです。)
:foobar.capitalize #=> :Foobar
:fooBar.capitalize #=> :Foobar
:FOOBAR.capitalize #=> :Foobar
:"foobar--".capitalize # => "Foobar--"
@see String#capitalize... -
Symbol
# capitalize(*options) -> Symbol (9207.0) -
シンボルに対応する文字列の先頭の文字を大文字に、残りを小文字に変更した シンボルを返します。
...に、残りを小文字に変更した
シンボルを返します。
(self.to_s.capitalize.intern と同じです。)
:foobar.capitalize #=> :Foobar
:fooBar.capitalize #=> :Foobar
:FOOBAR.capitalize #=> :Foobar
:"foobar--".capitalize # => "Foobar--"
@see String#capitalize... -
Symbol
# match(other) -> MatchData | nil (9207.0) -
正規表現 other とのマッチを行います。
...other とのマッチを行います。
(self.to_s.match(other) と同じです。)
@param other 比較対象のシンボルを指定します。
@return マッチが成功すれば MatchData オブジェクトを、そうでなければ nil を返します。
p :foo.match(/foo/) # => #<Mat......chData "foo">
p :foobar.match(/bar/) # => #<MatchData "bar">
p :foo.match(/bar/) # => nil
@see String#match
@see Symbol#match?... -
Symbol
# next -> Symbol (9207.0) -
シンボルに対応する文字列の「次の」文字列に対応するシンボルを返します。
...シンボルに対応する文字列の「次の」文字列に対応するシンボルを返します。
(self.to_s.next.intern と同じです。)
:a.next # => :b
:foo.next # => :fop
@see String#succ... -
Pathname
# make _ symlink(old) -> 0 (9117.0) -
File.symlink(old, self.to_s) と同じです。
...File.symlink(old, self.to_s) と同じです。
@see File.symlink... -
Pathname
# symlink? -> bool (9117.0) -
FileTest.symlink?(self.to_s) と同じです。
...FileTest.symlink?(self.to_s) と同じです。
@see FileTest.#symlink?... -
Symbol
# end _ with?(*suffixes) -> bool (9107.0) -
self の末尾が suffixes のいずれかであるとき true を返します。
...とき true を返します。
(self.to_s.end_with?と同じです。)
@param suffixes パターンを表す文字列 (のリスト)
@see Symbol#start_with?
@see String#end_with?
//emlist[][ruby]{
:hello.end_with?("ello") #=> true
# returns true if one of the +suffixes+ matches.......:hello.end_with?("heaven", "ello") #=> true
:hello.end_with?("heaven", "paradise") #=> false
//}... -
Symbol
# length -> Integer (9107.0) -
シンボルに対応する文字列の長さを返します。
...シンボルに対応する文字列の長さを返します。
(self.to_s.length と同じです。)
:foo.length #=> 3
@see String#length, String#size...