るりまサーチ

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

別のキーワード

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

ライブラリ

検索結果

<< < 1 2 3 4 5 > >>

Rake::Application#original_dir -> String (3101.0)

rake コマンドを実行したディレクトリを返します。

...rake コマンドを実行したディレクトリを返します。

//emlist[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app
task :test_rake_app do
Rake.application.original_dir # => "/path/to/dir"
end
//}...

Rake::Application#rakefile -> String (3101.0)

実際に使用されている Rakefile の名前を返します。

...実際に使用されている Rakefile の名前を返します。

//emlist[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app
task :test_rake_app do
Rake.application.rakefile # => "Rakefile"
end
//}...

Ripper#filename -> String (3101.0)

自身の持つ Ruby プログラムのファイル名を文字列で返します。

自身の持つ Ruby プログラムのファイル名を文字列で返します。

Ripper.tokenize(src, filename = &#39;-&#39;, lineno = 1) -> [String] (3101.0)

Ruby プログラム str をトークンに分割し、そのリストを返します。

...号を指定します。省略すると 1 になります。


//emlist[][ruby]{
require 'ripper'

p Ripper.tokenize("def m(a) nil end")
# => ["def", " ", "m", "(", "a", ")", " ", "nil", " ", "end"]
//}

Ripper.tokenize は空白やコメントも含め、
元の文字列にある文字は 1 バイ...

Ripper.tokenize(src, filename = &#39;-&#39;, lineno = 1, raise_errors: false) -> [String] (3101.0)

Ruby プログラム str をトークンに分割し、そのリストを返します。

...//emlist[][ruby]{
require 'ripper'

p Ripper.tokenize("def m(a) nil end")
# => ["def", " ", "m", "(", "a", ")", " ", "nil", " ", "end"]

Ripper.tokenize("def req(true) end", raise_errors: true)
# => SyntaxError (syntax error, unexpected `true', expecting ')')
//}

Ripper.tokenize は空白やコメ...

絞り込み条件を変える

Ripper::Filter#filename -> String (3101.0)

Ruby プログラムのファイル名を文字列で返します。

Ruby プログラムのファイル名を文字列で返します。

Ripper::Lexer#lex -> [[Integer, Integer], Symbol, String] (3101.0)

自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。

...自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。

ライブラリ内部で使用します。 Ripper.lex を使用してください。...

Ripper::Lexer#parse -> [[Integer, Integer], Symbol, String] (3101.0)

自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。た だし Ripper::Lexer#lex と違い、結果をソートしません。

...自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。た
だし Ripper::Lexer#lex と違い、結果をソートしません。

ライブラリ内部で使用します。...

Ripper::Lexer#tokenize -> [String] (3101.0)

自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。

...自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。

ライブラリ内部で使用します。 Ripper.tokenize を使用してください。...

Ripper::Version -> String (3101.0)

ripper のバージョンを文字列で返します。

...ripper のバージョンを文字列で返します。...

絞り込み条件を変える

Ripper::Filter (3006.0)

イベントドリブンスタイルで Ruby プログラムを加工するためのクラスです。

...require 'ripper'
require 'cgi'

class Ruby2HTML < Ripper::Filter
def on_default(event, tok, f)
f << CGI.escapeHTML(tok)
end

def on_comment(tok, f)
f << %Q[<span class="comment">#{CGI.escapeHTML(tok)}</span>]
end

def on_tstring_beg(tok, f)
f << %Q[<span class="string">#{CGI.es...
...capeHTML(tok)}]
end

def on_tstring_end(tok, f)
f << %Q[#{CGI.escapeHTML(tok)}</span>]
end
end

Ruby2HTML.new(ARGF).parse('')
//}

Ruby プログラムを解析して、Ripper::SCANNER_EVENTS にあるスキャナ
イベントを実行します。イベントはプログラムに書いた...

NEWS for Ruby 3.0.0 (264.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...[[[1]], {}]

pr.call([1, {a: 1}])
# 2.7 => [[1], {:a=>1}] # and deprecation warning
# 3.0 => a=>1}, {}]
//}

* Arguments forwarding (`...`) now supports leading arguments.
16378

//emlist{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
end
//}

* Pattern matching (`case/in`) is...
...", "f", 3]
in [*pre, String => x, String => y, *post]
p p
re #=> ["a", 1]
p x #=> "b"
p y #=> "c"
p p
ost #=> [2, "d", "e", "f", 3]
end
//}

* Endless method definition is added. [EXPERIMENTAL]
16746

//emlist{
def square(x) = x * x
//}

* Interpolated String literals are no lo...
...nger frozen when
`# frozen-string-literal: true` is used. 17104
* Magic comment `shareable_constant_value` added to freeze constants.
See {Magic Comments}[rdoc-ref:doc/syntax/comments.rdoc@Magic+Comments] for more details.
17273
* A {static analysis}[rdoc-label:label-Static+analysis]...

CGI::HtmlExtension#form(method = "post", action = nil, enctype = "application/x-www-form-urlencoded") -> String (242.0)

form 要素を生成します。 ブロックを与えると、ブロックを評価した結果が内容になります。

..."application/x-www-form-urlencoded" です。

例:
form{ "string" }
# <FORM METHOD="post" ENCTYPE="application/x-www-form-urlencoded">string</FORM>

form("get"){ "string" }
# <FORM METHOD="get" ENCTYPE="application/x-www-form-urlencoded">string</FORM>

form("get", "url"){ "string" }...
...# <FORM METHOD="get" ACTION="url" ENCTYPE="application/x-www-form-urlencoded">string</FORM>...
<< < 1 2 3 4 5 > >>