5件ヒット
[1-5件を表示]
(0.031秒)
別のキーワード
モジュール
-
ERB
:: DefMethod (1) -
ERB
:: Util (4)
キーワード
-
def
_ erb _ method (1) - h (1)
-
html
_ escape (1) - u (1)
-
url
_ encode (1)
検索結果
先頭5件
-
ERB
:: DefMethod . # def _ erb _ method(methodname , erb) -> nil (18310.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 (9010.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 (9010.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 (9010.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 (9010.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...