るりまサーチ

最速Rubyリファレンスマニュアル検索!
549件ヒット [201-300件を表示] (0.123秒)

別のキーワード

  1. string []=
  2. string []
  3. string slice!
  4. string slice
  5. string gsub

モジュール

キーワード

検索結果

<< < 1 2 3 4 5 ... > >>

Module#protected(name) -> String | Symbol (120.0)

メソッドを protected に設定します。

...ます。

可視性については d:spec/def#limit を参照して下さい。

@param name 0 個以上の String または Symbol を指定します。
@param names 0 個以上の String または Symbol を Array で指定します。

@raise NameError 存在しないメソッド名を指定し...

Module#public(name) -> String | Symbol (120.0)

メソッドを public に設定します。

...ます。

可視性については d:spec/def#limit を参照して下さい。

@param name 0 個以上の String または Symbol を指定します。
@param names 0 個以上の String または Symbol を Array で指定します。

@raise NameError 存在しないメソッド名を指定し...

IRB::Context#history_file -> String | nil (114.0)

履歴ファイルのパスを返します。

...履歴ファイルのパスを返します。

@return 履歴ファイルのパスを String か nil で返します。nil を返し
た場合は、~/.irb_history に履歴が保存されます。

@see lib:irb#history...

MatchData#captures -> [String] (109.0)

$1, $2, ... を格納した配列を返します。

$1, $2, ... を格納した配列を返します。

MatchData#to_a と異なり $& を要素に含みません。
グループにマッチした部分文字列がなければ対応する要素は nil になります。

//emlist[例][ruby]{
/(foo)(bar)(BAZ)?/ =~ "foobarbaz"
p $~.to_a # => ["foobar", "foo", "bar", nil]
p $~.captures # => ["foo", "bar", nil]
//}

@see MatchData#to_a, MatchData#named_captures, d...

MatchData#deconstruct -> [String] (109.0)

$1, $2, ... を格納した配列を返します。

$1, $2, ... を格納した配列を返します。

MatchData#to_a と異なり $& を要素に含みません。
グループにマッチした部分文字列がなければ対応する要素は nil になります。

//emlist[例][ruby]{
/(foo)(bar)(BAZ)?/ =~ "foobarbaz"
p $~.to_a # => ["foobar", "foo", "bar", nil]
p $~.captures # => ["foo", "bar", nil]
//}

@see MatchData#to_a, MatchData#named_captures, d...

絞り込み条件を変える

Binding#source_location -> [String, Integer] (108.0)

self の Ruby のソースファイル名と行番号を返します。

self の Ruby のソースファイル名と行番号を返します。

d:spec/variables#pseudo の __FILE__ と __LINE__ も参照してください。

//emlist[例][ruby]{
p binding.source_location # => ["test.rb", 1]
//}

IRB::Context#prompt_c -> String (108.0)

式が継続している時のプロンプトを表現するフォーマット文字列を返します。

式が継続している時のプロンプトを表現するフォーマット文字列を返します。

@see IRB::Context#prompt_c=, lib:irb#customize_prompt

IRB::Context#prompt_i -> String (108.0)

通常のプロンプトを表現するフォーマット文字列を返します。

通常のプロンプトを表現するフォーマット文字列を返します。

@see IRB::Context#prompt_i=,lib:irb#customize_prompt

IRB::Context#prompt_n -> String (108.0)

継続行のプロンプトを表現するフォーマット文字列を返します。

継続行のプロンプトを表現するフォーマット文字列を返します。

@see IRB::Context#prompt_n=, lib:irb#customize_prompt

IRB::Context#prompt_s -> String (108.0)

文字列中のプロンプトを表現するフォーマット文字列を返します。

文字列中のプロンプトを表現するフォーマット文字列を返します。

@see IRB::Context#prompt_s=, lib:irb#customize_prompt

絞り込み条件を変える

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

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

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

(self.to_s.start_with?と同じです。)

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

@see Symbol#end_with?

@see String#start_with?

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

# returns true if one of the prefixes matches.
:hello.start_with?("heaven", "hell") #=> true
:hello.start_with?("heaven", "paradise") #=> false
//}...

Object#===(other) -> bool (35.0)

case 式で使用されるメソッドです。d:spec/control#case も参照してください。

...se arg
when /ruby(?!\s*on\s*rails)/i
"hit! #{arg}"
when String
"Instance of String class. But don't hit."
else
"unknown"
end
end

puts check([]) #=> unknown
puts check("mash-up in Ruby on Rails") #=> instance of String class. But not hit...
puts check("<Ruby's world>") #=> hit! <...
<< < 1 2 3 4 5 ... > >>