るりまサーチ

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

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

キーワード

検索結果

Symbol#end_with?(*suffixes) -> bool (6138.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.all_symbols -> [Symbol] (19.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...

Symbol#start_with?(*prefixes) -> bool (13.0)

self の先頭が prefixes のいずれかであるとき true を返します。

....start_with?と同じです。)

@param prefixes パターンを表す文字列または正規表現 (のリスト)

@see Symbol#end_with?

@see String#start_with?

//emlist[][ruby]{
:hello.start_with?("hell") #=> true
:hello.start_with?(/H/i) #=> true

# returns true i...