50件ヒット
[1-50件を表示]
(0.026秒)
種類
- 文書 (17)
- インスタンスメソッド (11)
- 特異メソッド (11)
- モジュール関数 (11)
クラス
- ERB (22)
モジュール
- ObjectSpace (11)
キーワード
-
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 2
. 6 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (4) -
count
_ tdata _ objects (11) - new (11)
検索結果
先頭5件
-
ERB
# result(b=TOPLEVEL _ BINDING) -> String (18236.0) -
ERB を b の binding で実行し、結果の文字列を返します。
...ERB を b の binding で実行し、結果の文字列を返します。
@param b eRubyスクリプトが実行されるときのbinding
//emlist[例][ruby]{
require 'erb'
erb = ERB.new("test <%= test1 %>\ntest <%= test2 %>\n")
test1 = "foo"
test2 = "bar"
puts erb.result
# test foo
# test bar
//... -
ObjectSpace
. # count _ tdata _ objects(result _ hash = nil) -> Hash (125.0) -
T_DATA の種類ごとにオブジェクトの数を格納したハッシュを返します。
... result_hash 戻り値のためのハッシュを指定します。省略した場合は新
しくハッシュを作成します。result_hash の内容は上書き
されます。プローブ効果を避けるために使用します。
@raise TypeError result......byVM::InstructionSequence=>504, :parser=>5, :barrier=>6,
# :mutex=>6, Proc=>60, RubyVM::Env=>57, Mutex=>1, Encoding=>99,
# ThreadGroup=>1, Binding=>1, Thread=>1, RubyVM=>1, :iseq=>1,
# Random=>1, ARGF.class=>1, Data=>1, :autoload=>3, Time=>2}
//}
現在のバージョンでは、戻り... -
NEWS for Ruby 2
. 5 . 0 (42.0) -
NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...hods: true)
//}
* Rubyで書かれたファイルをいくつか読み込んでから、Coverage.result を使って結果を取得することができます。
//emlist[][ruby]{
Coverage.result
#=> { "/path/to/file.rb"=>
# { :lines => [1, 2, 0, nil, ...],
# :branches =>
# { [......また Coverage.result も旧フォーマットを返します。
//emlist[][ruby]{
Coverage.result
#=> { "/path/to/file.rb"=> [1, 2, 0, nil, ...] }
//}
* drb
* ACL::ACLEntry.new は IPAddr::InvalidPrefixError を抑制しなくなりました
* erb
* ERB#result_with_hash を追加......とエラーメッセージを逆順で表示するようにしました 8661 [実験的]
* binding.irb を実行したときに自動的に irb を読み込みます 13099 [実験的]
* binding.irb を実行したときに周囲のソースコードを表示します 14124
* matrix
*... -
NEWS for Ruby 2
. 6 . 0 (36.0) -
NEWS for Ruby 2.6.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...した。 13784
* Binding
* 新規メソッド
* Binding#source_location 追加 14230
* bindingのソースコード上の位置を __FILE__ と __LINE__ の二要素配列として返します。
従来でも eval("[__FILE__, __LINE__]", binding) とすることでこ......れらの情報は得られましたが、
将来的に Kernel.#eval は binding のソースコード行を無視する変更を予定しているため 4352、
この新しいメソッドを用いることが今後は推奨されます。
* Dir
* 新規メソッド......* :oneshot_lines キーワード引数が Coverage.start に追加されました。
* :stop と :clear キーワード引数が Coverage.result に追加されました。
clear が真の時、カウンターが0クリアされます。
stop が真の時、カバレッジ... -
NEWS for Ruby 3
. 0 . 0 (24.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...さい。
== 言語仕様の変更
* Keyword arguments are now separated from positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer......'--', 'data1', '--', 'data2', '--', 'data3']
dirty_data[(1..).step(2)] # take each second element
# => ["data1", "data2", "data3"]
//}
* Binding
* Binding#eval when called with one argument will use `"(eval)"` for `__FILE__` and `1` for `__LINE__` in the evaluated code. 4352 17419
* Conditi......nVariable#wait may now invoke the `block`/`unblock` scheduler hooks in a non-blocking context. 16786
* Dir
* Dir.glob and Dir.[] now sort the results by default, and accept the `sort:` keyword option. 8709
* ENV
* ENV.except has been added, which returns a hash excluding the given keys... -
ERB
. new(str , safe _ level=NOT _ GIVEN , trim _ mode=NOT _ GIVEN , eoutvar=NOT _ GIVEN , trim _ mode: nil , eoutvar: & # 39; _ erbout& # 39;) -> ERB (18.0) -
eRubyスクリプト から ERB オブジェクトを生成して返します。
...d
def build
b = binding
# create and run templates, filling member data variables
ERB.new(<<~'END_PRODUCT', eoutvar: "@product").result b
<%= PRODUCT[:name] %>
<%= PRODUCT[:desc] %>
END_PRODUCT
ERB.new(<<~'END_PRICE', eoutvar: "@price").result b
<%= PRODUCT[:... -
ERB
. new(str , safe _ level=nil , trim _ mode=nil , eoutvar=& # 39; _ erbout& # 39;) -> ERB (18.0) -
eRubyスクリプト から ERB オブジェクトを生成して返します。
...b = binding
# create and run templates, filling member data variables
ERB.new(<<-'END_PRODUCT'.gsub(/^\s+/, ""), 0, "", "@product").result b
<%= PRODUCT[:name] %>
<%= PRODUCT[:desc] %>
END_PRODUCT
ERB.new(<<-'END_PRICE'.gsub(/^\s+/, ""), 0, "", "@price").result b... -
ERB
. new(str , trim _ mode: nil , eoutvar: & # 39; _ erbout& # 39;) -> ERB (18.0) -
eRubyスクリプト から ERB オブジェクトを生成して返します。
...d
def build
b = binding
# create and run templates, filling member data variables
ERB.new(<<~'END_PRODUCT', eoutvar: "@product").result b
<%= PRODUCT[:name] %>
<%= PRODUCT[:desc] %>
END_PRODUCT
ERB.new(<<~'END_PRICE', eoutvar: "@price").result b
<%= PRODUCT[:...