714件ヒット
[1-100件を表示]
(0.180秒)
ライブラリ
- abbrev (12)
- benchmark (60)
- bigdecimal (24)
-
bigdecimal
/ math (72) - cmath (78)
- digest (12)
- erb (36)
- fileutils (120)
- json (48)
- open3 (120)
- readline (12)
- shellwords (48)
-
webrick
/ htmlutils (12) -
webrick
/ httpauth (12) -
webrick
/ httpstatus (12) -
webrick
/ httputils (24) -
win32
/ resolv (12)
クラス
-
Win32
:: Resolv (12)
モジュール
- Abbrev (12)
- Benchmark (60)
- BigMath (96)
- CMath (78)
- Digest (12)
-
ERB
:: DefMethod (12) -
ERB
:: Util (24) - FileUtils (120)
- JSON (48)
- Open3 (120)
- Readline (12)
- Shellwords (48)
-
WEBrick
:: HTMLUtils (12) -
WEBrick
:: HTTPAuth (12) -
WEBrick
:: HTTPStatus (12) -
WEBrick
:: HTTPUtils (24)
キーワード
- E (12)
- PI (12)
- abbrev (12)
- atan (12)
-
basic
_ auth (12) - benchmark (12)
- bm (12)
- bmbm (12)
- cbrt (6)
- cbrt! (6)
- chdir (24)
- chmod (12)
-
chmod
_ R (12) - chown (12)
-
chown
_ R (12) - cos (12)
- cos! (6)
-
def
_ erb _ method (12) - escape (12)
- exp (18)
- exp! (6)
- generate (12)
-
get
_ hosts _ path (12) - hexencode (12)
-
html
_ escape (12) -
load
_ mime _ types (12) - log (24)
- log! (12)
- measure (12)
-
mime
_ type (12) - mkpath (12)
-
pipeline
_ r (24) -
pipeline
_ rw (24) -
pipeline
_ start (24) -
pipeline
_ w (24) - popen3 (24)
-
pretty
_ generate (12) -
pretty
_ unparse (12) - readline (12)
- realtime (12)
-
reason
_ phrase (12) -
remove
_ entry (12) - shellescape (12)
- shelljoin (12)
- shellsplit (12)
- shellwords (12)
- sin (12)
- sin! (6)
- sqrt (18)
- sqrt! (6)
- tan! (6)
- touch (12)
- unparse (12)
- uptodate? (12)
検索結果
先頭5件
-
ERB
:: Util . # h(s) -> String (21208.0) -
文字列 s を HTML用にエスケープした文字列を返します。
...s を HTML用にエスケープした文字列を返します。
文字列 s 中に含まれる &"<> を、実体参照 & " < > にそれぞれ変更した文字列を返します
(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
:: DefMethod . # def _ erb _ method(methodname , erb) -> nil (18407.0) -
self に 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... -
Shellwords
. # shellsplit(line) -> [String] (15219.0) -
Bourne シェルの単語分割規則に従った空白区切りの単語分割を行い、 単語 (文字列) の配列を返します。
...す。
@return 分割結果の各文字列を要素とする配列を返します。
@raise ArgumentError 引数の中に対でないシングルクォートまたはダブル
クォートが現れた場合に発生します。
例:
require 'shellwords'
p Shellwords.shellwords(%......q{ foo bar "foo bar"\ baz 'foo bar' })
# => ["foo", "bar", "foo bar baz", "foo bar"]
p Shellwords.shellwords(%q{ A B C "D E F" "G","H I" })
# => ["A", "B", "C", "D E F", "G,H I"]... -
Shellwords
. # shellwords(line) -> [String] (12219.0) -
Bourne シェルの単語分割規則に従った空白区切りの単語分割を行い、 単語 (文字列) の配列を返します。
...す。
@return 分割結果の各文字列を要素とする配列を返します。
@raise ArgumentError 引数の中に対でないシングルクォートまたはダブル
クォートが現れた場合に発生します。
例:
require 'shellwords'
p Shellwords.shellwords(%......q{ foo bar "foo bar"\ baz 'foo bar' })
# => ["foo", "bar", "foo bar baz", "foo bar"]
p Shellwords.shellwords(%q{ A B C "D E F" "G","H I" })
# => ["A", "B", "C", "D E F", "G,H I"]... -
ERB
:: Util . # html _ escape(s) -> String (12208.0) -
文字列 s を HTML用にエスケープした文字列を返します。
...s を HTML用にエスケープした文字列を返します。
文字列 s 中に含まれる &"<> を、実体参照 & " < > にそれぞれ変更した文字列を返します
(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?
//}... -
FileUtils
. # touch(list , options = {}) -> () (12207.0) -
list で指定されたファイルの最終変更時刻 (mtime) と アクセス時刻 (atime) を変更します。
...list で指定されたファイルの最終変更時刻 (mtime) と
アクセス時刻 (atime) を変更します。
list で指定されたファイルが存在しない場合は空のファイルを作成します。
@param list 対象のファイル。一つの場合は文字列も指定可......場合は配列で指定します。
@param options :mtime, :nocreate, :noop, :verbose が指定できます。
c:FileUtils#options
//emlist[][ruby]{
require 'fileutils'
FileUtils.touch('timestamp')
FileUtils.touch('timestamp', mtime: Time.now)
FileUtils.touch(Dir.glob('*.c'))
//}... -
WEBrick
:: HTTPAuth . # basic _ auth(req , res , realm) {|user , pass| . . . } -> nil (12207.0) -
Basic 認証を行うためのメソッドです。
...ck::HTTPRequest オブジェクトを指定します。
@param res WEBrick::HTTPResponse オブジェクトを指定します。
@param realm 認証のレルムを文字列で指定します。
@raise WEBrick::HTTPStatus::Unauthorized 認証に失敗した場合に発生します。
require 'w......ebrick'
srv.mount_proc('/basic_auth') {|req, res|
HTTPAuth.basic_auth(req, res, "WEBrick's realm") {|user, pass|
user == 'webrick' && pass == 'supersecretpassword'
}
res.body = "hoge"
}... -
Win32
:: Resolv . # get _ hosts _ path -> String | nil (12207.0) -
hosts ファイルのパスを返します。ファイルが存在しない場合は nil を返します。
...
hosts ファイルのパスを返します。ファイルが存在しない場合は nil を返します。
例:
require "win32/resolv"
p Win32::Resolv.get_hosts_path #=> "C:\Windows\System32\drivers\etc\hosts"... -
Benchmark
. # benchmark(caption = "" , label _ width = nil , fmtstr = nil , *labels) {|rep| . . . } -> [Benchmark :: Tms] (9313.0) -
Benchmark::Report オブジェクトを生成し、それを引数として与えられたブロックを実行します。
...Benchmark::Report オブジェクトを生成し、それを引数として与えられたブロックを実行します。
基本的には以下のように使います。
ブロックが Benchmark::Tms オブジェクトの配列を返した場合は、
それらの数値も追加の行に表示......。
@param caption レポートの一行目に表示する文字列を指定します。
@param label_width ラベルの幅を指定します。
@param fmtstr フォーマット文字列を指定します。
この引数を省略すると Benchmark::FORMAT が使用さ......ックが Benchmark::Tms オブジェクトの配列を返す場合に指定します。
=== フォーマット文字列
フォーマット文字列として以下が使用できます。
: %u
user CPU time で置き換えられます。Benchmark::Tms#utime
: %y
system CPU time で置き換...