るりまサーチ (Ruby 2.6.0)

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

別のキーワード

  1. string []=
  2. string slice
  3. string slice!
  4. string []
  5. string gsub!

検索結果

String#sum(bits = 16) -> Integer (63022.0)

文字列の bits ビットのチェックサムを計算します。

文字列の bits ビットのチェックサムを計算します。

以下と同じです。

//emlist[][ruby]{
def sum(bits)
sum = 0
each_byte {|c| sum += c }
return 0 if sum == 0
sum & ((1 << bits) - 1)
end
//}

例えば以下のコードで UNIX System V の
sum(1) コマンドと同じ値が得られます。

//emlist[例][ruby]{
sum = 0
ARGF.each_line do |line|
sum += line.sum
end
sum %= ...

REXML::DocType#system -> String | nil (54664.0)

DTD のシステム識別子を返します。

DTD のシステム識別子を返します。

DTD が外部サブセットを含んでいない場合は nil を返します。

//emlist[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
EOS
doctype.system # => "http://www.w...

Net::FTP#system -> String (54610.0)

サーバーの OS のタイプを返します。

サーバーの OS のタイプを返します。

@raise Net::FTPTempError 応答コードが 4yz のときに発生します。
@raise Net::FTPPermError 応答コードが 5yz のときに発生します。
@raise Net::FTPProtoError 応答コードが RFC 的に正しくない場合に発生します。
@raise Net::FTPReplyError 応答コードが上の場合以外でエラーである場合に発生します。

REXML::NotationDecl#system -> String | nil (54610.0)

システム識別子(URI)を返します。

システム識別子(URI)を返します。

宣言がシステム識別子を含まない場合は nil を返します。

Gem::SourceInfoCache#latest_system_cache_file -> String (18610.0)

最新のシステムキャッシュのファイル名を返します。

最新のシステムキャッシュのファイル名を返します。

絞り込み条件を変える

Gem::SourceInfoCache#system_cache_file -> String (18610.0)

システムキャッシュファイルの名前を返します。

システムキャッシュファイルの名前を返します。

Shell::SystemCommand#command -> String (9310.0)

@todo

@todo

コマンド名を返します。

Shell::SystemCommand#name -> String (9310.0)

@todo

@todo

コマンド名を返します。

Shell::SystemCommand#notify(*opts) -> String (9310.0)

@todo

@todo

@param opts

@see Shell#notify

Shell::SystemCommand#notify(*opts) {|message| ... } -> String (9310.0)

@todo

@todo

@param opts

@see Shell#notify

絞り込み条件を変える

REXML::DocType#public -> String | nil (361.0)

DTD の公開識別子を返します。

DTD の公開識別子を返します。

DTD が公開識別子による外部サブセットを含んでいない場合は nil を返します。

//emlist[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
EOS
doctype.system # => "http:/...

REXML::DocType#external_id -> String | nil (355.0)

DTD が外部サブセットを用いている場合は "SYSTEM", "PUBLIC" の いずれかの文字列を返します。

DTD が外部サブセットを用いている場合は "SYSTEM", "PUBLIC" の
いずれかの文字列を返します。

それ以外の場合は nil を返します。

//emlist[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
EOS
doctype....

REXML::Entity#external -> String | nil (355.0)

実体が外部実体(external entity)宣言である場合は "SYSTEM" もしくは "PUBLIC" という文字列を返します。

実体が外部実体(external entity)宣言である場合は
"SYSTEM" もしくは "PUBLIC" という文字列を返します。

内部実体(internal entity)宣言である場合には nil を返します。

Benchmark::Tms#format(fmtstr = nil, *args) -> String (343.0)

self を指定されたフォーマットで整形して返します。

self を指定されたフォーマットで整形して返します。

このメソッドは Kernel.#format のようにオブジェクトを整形しますが、
以下の拡張を使用することができます。

: %u
user CPU time で置き換えられます。Benchmark::Tms#utime
: %y
system CPU time で置き換えられます(Mnemonic: y of "s*y*stem")。Benchmark::Tms#stime
: %U
子プロセスの user CPU time で置き換えられます。Benchmark::Tms#cutime
: %Y
子プロセスの s...

RDoc::Options#op_dir -> String (325.0)

コマンドライン引数の --op オプションで指定したディレクトリを返します。

コマンドライン引数の --op オプションで指定したディレクトリを返します。

--ri、--ri-site、--ri-system オプションにも影響される事に注意してください。

@return 設定されたディレクトリを文字列で返します。

絞り込み条件を変える

Shell::Filter#to_a -> [String] (325.0)

実行結果を文字列の配列で返します。

実行結果を文字列の配列で返します。

require 'shell'
Shell.def_system_command("wc")
sh = Shell.new
puts sh.cat("/etc/passwd").to_a

Shell::Filter#to_s -> String (325.0)

実行結果を文字列で返します。

実行結果を文字列で返します。

require 'shell'
Shell.def_system_command("wc")
sh = Shell.new

sh.transact {
puts (cat("/etc/passwd") | wc("-l")).to_s
}

Shell#echo(*strings) -> Shell::Filter (322.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

実行すると, それらを内容とする Filter オブジェクトを返します.

@param strings シェルコマンド echo に与える引数を文字列で指定します。

動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "al...

Shell::CommandProcessor#echo(*strings) -> Shell::Filter (322.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

実行すると, それらを内容とする Filter オブジェクトを返します.

@param strings シェルコマンド echo に与える引数を文字列で指定します。

動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "al...

Shell::Filter#echo(*strings) -> Shell::Filter (322.0)

実行すると, それらを内容とする Filter オブジェクトを返します.

実行すると, それらを内容とする Filter オブジェクトを返します.

@param strings シェルコマンド echo に与える引数を文字列で指定します。

動作例
require 'shell'
Shell.def_system_command("head")
sh = Shell.new
sh.transact {
glob("*.txt").to_a.each { |file|
file.chomp!
cat(file).each { |l|
echo(l) | tee(file + ".tee") >> "al...

絞り込み条件を変える