55件ヒット
[1-55件を表示]
(0.007秒)
モジュール
-
ERB
:: DefMethod (11) -
ERB
:: Util (44)
キーワード
-
def
_ erb _ method (11) - h (11)
-
html
_ escape (11) - u (11)
-
url
_ encode (11)
検索結果
先頭5件
-
ERB
:: DefMethod . # def _ erb _ method(methodname , erb) -> nil (3.0) -
self に erb のスクリプトをメソッドとして定義します。
... erb のスクリプトをメソッドとして定義します。
メソッド名は methodname で指定します。
erb が文字列の時、そのファイルを読み込み ERB で変換したのち、メソッドとして定義します。
@param methodname メソッド名
@param erb ERBイ......ンスタンスもしくはERBソースファイル名
例:
require 'erb'
class Writer
extend ERB::DefMethod
def_erb_method('to_html', 'writer.erb')
...
end
...
puts writer.to_html... -
ERB
:: Util . # h(s) -> String (3.0) -
文字列 s を HTML用にエスケープした文字列を返します。
...照 & " < > にそれぞれ変更した文字列を返します
(CGI.escapeHTMLとほぼ同じです)。
@param s HTMLエスケープを行う文字列
//emlist[例][ruby]{
require "erb"
include ERB::Util
puts html_escape("is a > 0 & a < 10?")
# is a > 0 & a < 10?
//}... -
ERB
:: Util . # html _ escape(s) -> String (3.0) -
文字列 s を HTML用にエスケープした文字列を返します。
...照 & " < > にそれぞれ変更した文字列を返します
(CGI.escapeHTMLとほぼ同じです)。
@param s HTMLエスケープを行う文字列
//emlist[例][ruby]{
require "erb"
include ERB::Util
puts html_escape("is a > 0 & a < 10?")
# is a > 0 & a < 10?
//}... -
ERB
:: Util . # u(s) -> String (3.0) -
文字列 s を URLエンコードした文字列を返します。
...た文字列を返します(CGI.escapeとほぼ同じです)。
@param s URLエンコードを行う文字列
//emlist[例][ruby]{
require "erb"
include ERB::Util
puts url_encode("Programming Ruby: The Pragmatic Programmer's Guide")
# Programming%20Ruby%3A%20%20The%20Pragmatic%20Programmer%27s%2... -
ERB
:: Util . # url _ encode(s) -> String (3.0) -
文字列 s を URLエンコードした文字列を返します。
...た文字列を返します(CGI.escapeとほぼ同じです)。
@param s URLエンコードを行う文字列
//emlist[例][ruby]{
require "erb"
include ERB::Util
puts url_encode("Programming Ruby: The Pragmatic Programmer's Guide")
# Programming%20Ruby%3A%20%20The%20Pragmatic%20Programmer%27s%2...