るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.021秒)

別のキーワード

  1. kernel require
  2. getoptlong require_order
  3. irb/ext/use-loader irb_require
  4. rubygems/custom_require require
  5. require execute

ライブラリ

キーワード

検索結果

WEBrick::Utils.#getservername -> String (22.0)

プロセスが動いているマシンのホスト名を文字列で返します。

...プロセスが動いているマシンのホスト名を文字列で返します。

require 'webrick'
p WEBrick::Utils.getservername #=> "localhost"...

WEBrick::Utils.#random_string(len) -> String (22.0)

A-Z, a-z, 0-9 からなる長さ len のランダムな文字列を返します。

...A-Z, a-z, 0-9 からなる長さ len のランダムな文字列を返します。

@param len 得たい文字列の長さを整数で指定します。単位はバイトです。

require 'webrick'
p WEBrick::Utils.random_string(10) #=> "xF0jwU4RJd"...