るりまサーチ

最速Rubyリファレンスマニュアル検索!
73件ヒット [1-73件を表示] (0.145秒)
トップページ > クエリ:I[x] > クエリ:a[x] > ライブラリ:erb[x] > クエリ:u[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. csv to_i
  5. matrix i

クラス

モジュール

キーワード

検索結果

ERB::Util.#u(s) -> String (21209.0)

文字列 s を URLエンコードした文字列を返します。

... URLエンコードした文字列を返します。

文字列 s 中に含まれる 2バイト文字や半角スペースについて URL エンコードを行った文字列を返します(CGI.escapeとほぼ同じです)。

@param s URLエンコードを行う文字列

//emlist[例][ruby]{
requ...
...ire "erb"
i
nclude ERB::Util

puts url_encode("Programming Ruby: The Pragmatic Programmer's Guide")
# Programming%20Ruby%3A%20%20The%20Pragmatic%20Programmer%27s%20Guide
//}...

ERB#result_with_hash(hash) -> String (18402.0)

ERB をハッシュオブジェクトで指定されたローカル変数を持つ 新しいトップレベルバインディングで実行し、結果の文字列を返します。

...
ERB
をハッシュオブジェクトで指定されたローカル変数を持つ
新しいトップレベルバインディングで実行し、結果の文字列を返します。

@param hash ローカル変数名をキーにしたハッシュ

@see ERB#result...

ERB#set_eoutvar(compiler, eoutvar = '_erbout') -> Array (12702.0)

ERBの中でeRubyスクリプトの出力をためていく変数を設定します。

...
ERB
の中でeRubyスクリプトの出力をためていく変数を設定します。

ERB
でeRubyスクリプトの出力をためていく変数を設定するために使用します。
この設定は ERB#new でも行えるため、通常はそちらを使用した方がより容易です。...
...本メソッドを使用するためには、引数にて指定する eRuby コンパイラを事前に生成しておく必要があります。

@param compiler eRubyコンパイラ

@param eoutvar eRubyスクリプトの中で出力をためていく変数...

ERB::Util.#html_escape(s) -> String (9226.0)

文字列 s を HTML用にエスケープした文字列を返します。

...体参照 & " < > にそれぞれ変更した文字列を返します
(CGI.escapeHTMLとほぼ同じです)。

@param s HTMLエスケープを行う文字列

//emlist[例][ruby]{
require "erb"
i
nclude ERB::Util

puts html_escape("is a > 0 & a < 10?")
# is a &gt; 0 &amp; a &lt; 10?
/...

ERB::Util.#url_encode(s) -> String (9209.0)

文字列 s を URLエンコードした文字列を返します。

... URLエンコードした文字列を返します。

文字列 s 中に含まれる 2バイト文字や半角スペースについて URL エンコードを行った文字列を返します(CGI.escapeとほぼ同じです)。

@param s URLエンコードを行う文字列

//emlist[例][ruby]{
requ...
...ire "erb"
i
nclude ERB::Util

puts url_encode("Programming Ruby: The Pragmatic Programmer's Guide")
# Programming%20Ruby%3A%20%20The%20Pragmatic%20Programmer%27s%20Guide
//}...

絞り込み条件を変える

ERB::Util.#h(s) -> String (6126.0)

文字列 s を HTML用にエスケープした文字列を返します。

...体参照 &amp; &quot; &lt; &gt; にそれぞれ変更した文字列を返します
(CGI.escapeHTMLとほぼ同じです)。

@param s HTMLエスケープを行う文字列

//emlist[例][ruby]{
require "erb"
i
nclude ERB::Util

puts html_escape("is a > 0 & a < 10?")
# is a &gt; 0 &amp; a &lt; 10?
/...

ERB.new(str, safe_level=NOT_GIVEN, trim_mode=NOT_GIVEN, eoutvar=NOT_GIVEN, trim_mode: nil, eoutvar: &#39;_erbout&#39;) -> ERB (720.0)

eRubyスクリプト から ERB オブジェクトを生成して返します。

...eRubyスクリプト から ERB オブジェクトを生成して返します。

@param str eRubyスクリプトを表す文字列
@param safe_level eRubyスクリプトが実行されるときのセーフレベル
@param trim_mode 整形の挙動を変更するオプション

@param eoutvar eRuby...
...Ruby スクリプトの中でさらに ERB を使うときに変更
します。通常は指定する必要はありません。

Ruby 2.6.0 から位置引数での safe_level, trim_mode, eoutvar の指定は非推奨です。
Ruby 3.2 で削除されました。
trim_mode と eoutva...
...list[例][ruby]{
require "erb"

# build data class
class Listings
PRODUCT = { :name => "Chicken Fried Steak",
:desc => "A well messages pattie, breaded and fried.",
:cost => 9.95 }

a
ttr_reader :product, :price

def initialize( product = "", price = "" )
@produc...

ERB.new(str, safe_level=nil, trim_mode=nil, eoutvar=&#39;_erbout&#39;) -> ERB (520.0)

eRubyスクリプト から ERB オブジェクトを生成して返します。

...eRubyスクリプト から ERB オブジェクトを生成して返します。

@param str eRubyスクリプトを表す文字列
@param safe_level eRubyスクリプトが実行されるときのセーフレベル
@param trim_mode 整形の挙動を変更するオプション

@param eoutvar eRuby...
...Ruby スクリプトの中でさらに ERB を使うときに変更
します。通常は指定する必要はありません。

Ruby 2.6.0 から位置引数での safe_level, trim_mode, eoutvar の指定は非推奨です。
Ruby 3.2 で削除されました。
trim_mode と eoutva...
...list[例][ruby]{
require "erb"

# build data class
class Listings
PRODUCT = { :name => "Chicken Fried Steak",
:desc => "A well messages pattie, breaded and fried.",
:cost => 9.95 }

a
ttr_reader :product, :price

def initialize( product = "", price = "" )
@produc...

ERB.new(str, trim_mode: nil, eoutvar: &#39;_erbout&#39;) -> ERB (420.0)

eRubyスクリプト から ERB オブジェクトを生成して返します。

...eRubyスクリプト から ERB オブジェクトを生成して返します。

@param str eRubyスクリプトを表す文字列
@param trim_mode 整形の挙動を変更するオプション

@param eoutvar eRubyスクリプトの中で出力をためていく変数の名前を表す文...
...eRuby スクリプトの中でさらに ERB を使うときに変更
します。通常は指定する必要はありません。


//emlist[例][ruby]{
require "erb"

# build data class
class Listings
PRODUCT = { :name => "Chicken Fried Steak",
:desc => "A well messag...
...attie, breaded and fried.",
:cost => 9.95 }

a
ttr_reader :product, :price

def initialize( product = "", price = "" )
@product = product
@price = price
end

def build
b = binding
# create and run templates, filling member data variables
ERB
.new(<<~'END_PRODU...