るりまサーチ

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

別のキーワード

  1. _builtin end
  2. ripper end_seen?
  3. _builtin exclude_end?
  4. _builtin end_with?
  5. zlib end

ライブラリ

キーワード

検索結果

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...