24件ヒット
[1-24件を表示]
(0.054秒)
種類
- インスタンスメソッド (12)
- 特異メソッド (12)
ライブラリ
- ビルトイン (24)
キーワード
-
all
_ symbols (12) -
end
_ with? (6) -
start
_ with? (6)
検索結果
先頭3件
-
Symbol
# end _ with?(*suffixes) -> bool (6132.0) -
self の末尾が suffixes のいずれかであるとき 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
# start _ with?(*prefixes) -> bool (7.0) -
self の先頭が prefixes のいずれかであるとき true を返します。
...します。
(self.to_s.start_with?と同じです。)
@param prefixes パターンを表す文字列または正規表現 (のリスト)
@see Symbol#end_with?
@see String#start_with?
//emlist[][ruby]{
:hello.start_with?("hell") #=> true
:hello.start_with?(/H/i) #=... -
Symbol
. all _ symbols -> [Symbol] (7.0) -
定義済みの全てのシンボルオブジェクトの配列を返します。
...定義済みの全てのシンボルオブジェクトの配列を返します。
p Symbol.all_symbols #=> [:RUBY_PLATFORM, :RUBY_VERSION, ...]
リテラルで表記したシンボルのうち、コンパイル時に値が決まるものはその時に生成されます。
それ以外の式......す)
def number
'make_3'
end
p Symbol.all_symbols.select{|sym|sym.to_s.include? 'make'}
#=> [:make_1, :make_2]
re = #確実に生成されるように代入操作を行う
:make_1,
:'make_2',
:"#{number}",
'make_4'.intern
p Symbol.all_symbols.select{|sym|sym.to_s.include...