るりまサーチ

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

別のキーワード

  1. socket int
  2. prime int_from_prime_division
  3. _builtin to_int
  4. mkmf convertible_int
  5. option int

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 3 > >>

Shell#test(command, file1, file2 = nil) -> bool | Time | Integer | nil (15230.0)

Kernel.#test や FileTest のメソッドに処理を委譲します。

...Kernel.#test や FileTest のメソッドに処理を委譲します。

@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。

@para...
...ell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo"] # => true
p sh[:exists?, "foo"] # => true
p sh["exists?", "foo"] # => true

@see Kernel.#test, FileTest...

Shell::CommandProcessor#test(command, file1, file2 = nil) -> bool | Time | Integer | nil (15230.0)

Kernel.#test や FileTest のメソッドに処理を委譲します。

...Kernel.#test や FileTest のメソッドに処理を委譲します。

@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。

@para...
...ell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo"] # => true
p sh[:exists?, "foo"] # => true
p sh["exists?", "foo"] # => true

@see Kernel.#test, FileTest...

Shell::Filter#test(command, file1, file2 = nil) -> bool | Time | Integer | nil (15230.0)

Kernel.#test や FileTest のメソッドに処理を委譲します。

...Kernel.#test や FileTest のメソッドに処理を委譲します。

@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。

@para...
...ell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo"] # => true
p sh[:exists?, "foo"] # => true
p sh["exists?", "foo"] # => true

@see Kernel.#test, FileTest...

StringScanner#pointer -> Integer (6213.0)

現在のスキャンポインタのインデックスを返します。

...ンポインタのインデックスを返します。

//emlist[例][ruby]{
require 'strscan'

s = StringScanner.new('test string')
s.pos # => 0
s.scan(/\w+/) # => "test"
s.pos # => 4
s.scan(/\w+/) # => nil
s.pos # => 4
s.scan(/\s+/) # => " "
s.pos # => 5
//}

@see S...

ARGF.class#each_codepoint -> Enumerator (6137.0)

self の各コードポイントに対して繰り返しブロックを呼びだします。

...を返します。

例:
# $ echo "line1\n" > test1.txt
# $ echo "line2\n" > test2.txt
# $ ruby test.rb test1.txt test2.txt

# test.rb
ARGF.each_codepoint # => #<Enumerator: ARGF:each_codepoint>
ARGF.each_codepoint{|e|print e, ","} # => 108,105,110,101,49,10,108,105,110...

絞り込み条件を変える

ARGF.class#each_codepoint { |c| ... } -> self (6137.0)

self の各コードポイントに対して繰り返しブロックを呼びだします。

...を返します。

例:
# $ echo "line1\n" > test1.txt
# $ echo "line2\n" > test2.txt
# $ ruby test.rb test1.txt test2.txt

# test.rb
ARGF.each_codepoint # => #<Enumerator: ARGF:each_codepoint>
ARGF.each_codepoint{|e|print e, ","} # => 108,105,110,101,49,10,108,105,110...

Rake::TaskManager#intern(task_class, task_name) -> Rake::Task (6125.0)

タスクを検索します。

...//emlist[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app

task :test_rake_app do |task|
task.application.intern(Rake::Task, "test_rake_app") # => <Rake::Task test_rake_app => []>
task.application.intern(Rake::Task, "sample_task") # => <Rake::Task sample_task => []>
e...

ARGF.class#internal_encoding -> Encoding | nil (6113.0)

ARGF から読み込んだ文字列の内部エンコーディングを返します。 内部エンコーディングが指定されていない場合は nil を返します。

...設定します。


例:
# $ ruby -Eutf-8 test.rb

# test.rb
ARGF.internal_encoding # => #<Encoding:UTF-8>
ARGF.set_encoding('utf-8','ascii')
ARGF.internal_encoding # => #<Encoding:US-ASCII>

例:
ARGF.binmode
ARGF.internal_encoding # => nil

@see IO,...

StringScanner#pointer=(n) (6113.0)

スキャンポインタのインデックスを n にセットします。

...指定すると発生します。

@return n を返します。

//emlist[例][ruby]{
require 'strscan'

s = StringScanner.new('test string')
p s.scan(/\w+/) # => "test"
p s.pos = 1 # => 1
p s.scan(/\w+/) # => "est"
p s.pos = 7 # => 7
p s.scan(/\w+/) # => "ring"

begin
s.pos = 20
rescue Ra...

StringScanner#pos -> Integer (3113.0)

現在のスキャンポインタのインデックスを返します。

...ンポインタのインデックスを返します。

//emlist[例][ruby]{
require 'strscan'

s = StringScanner.new('test string')
s.pos # => 0
s.scan(/\w+/) # => "test"
s.pos # => 4
s.scan(/\w+/) # => nil
s.pos # => 4
s.scan(/\s+/) # => " "
s.pos # => 5
//}

@see S...

絞り込み条件を変える

StringScanner#pos=(n) (3013.0)

スキャンポインタのインデックスを n にセットします。

...指定すると発生します。

@return n を返します。

//emlist[例][ruby]{
require 'strscan'

s = StringScanner.new('test string')
p s.scan(/\w+/) # => "test"
p s.pos = 1 # => 1
p s.scan(/\w+/) # => "est"
p s.pos = 7 # => 7
p s.scan(/\w+/) # => "ring"

begin
s.pos = 20
rescue Ra...
<< 1 2 3 > >>