クラス
-
ARGF
. class (11) - Array (24)
- BasicObject (12)
- Binding (5)
- Class (5)
- Dir (16)
-
Encoding
:: Converter (4) -
Encoding
:: InvalidByteSequenceError (2) -
Encoding
:: UndefinedConversionError (1) - Enumerator (10)
-
Enumerator
:: ArithmeticSequence (5) -
Enumerator
:: Lazy (5) -
Enumerator
:: Yielder (2) - Exception (11)
- Fiber (3)
- File (7)
-
File
:: Stat (6) - Hash (7)
- IO (51)
- Integer (2)
- KeyError (2)
- LoadError (1)
- LocalJumpError (2)
- MatchData (8)
- Method (20)
- Module (72)
- NameError (4)
- NoMethodError (1)
- Numeric (10)
- Object (39)
- Proc (10)
- Random (3)
- Range (14)
- Regexp (9)
-
RubyVM
:: InstructionSequence (8) - SignalException (2)
- StopIteration (1)
- String (17)
- Struct (4)
- Symbol (1)
- SystemCallError (2)
- SystemExit (2)
- Thread (20)
-
Thread
:: Backtrace :: Location (4) -
Thread
:: ConditionVariable (2) -
Thread
:: Mutex (4) -
Thread
:: Queue (4) -
Thread
:: SizedQueue (3) - TracePoint (18)
- UnboundMethod (3)
- UncaughtThrowError (3)
モジュール
- Enumerable (20)
-
File
:: Constants (1) - Kernel (67)
- Math (1)
- ObjectSpace (3)
- Process (2)
-
Process
:: GID (2) -
Process
:: UID (2) -
RubyVM
:: AbstractSyntaxTree (1) - Signal (2)
- Warning (1)
キーワード
- ! (1)
- != (1)
-
$ & (1) -
$ & # 39; (1) -
$ 1 (1) -
$ 10 (1) -
$ 11 (1) -
$ 2 (1) -
$ 3 (1) -
$ 4 (1) -
$ 5 (1) -
$ 6 (1) -
$ 7 (1) -
$ 8 (1) -
$ 9 (1) -
$ _ (1) -
$ ` (1) -
$ stdin (1) -
$ ~ (1) - % (1)
-
/ (1) - < (1)
- << (3)
- <= (1)
- <=> (1)
- == (5)
- === (8)
- =~ (1)
- > (1)
- >= (1)
- >> (2)
- APPEND (1)
- ARGF (1)
- BasicObject (1)
- ConditionVariable (1)
- DATA (1)
- EOFError (1)
- EXTENDED (1)
- Enumerator (1)
- Fiber (1)
- Interrupt (1)
- Location (1)
- Method (1)
- Mutex (1)
- Numeric (1)
- Proc (1)
- Queue (1)
-
SEEK
_ END (1) - SizedQueue (1)
- Status (1)
- String (2)
- Thread (1)
- ThreadGroup (1)
- TracePoint (1)
- UnboundMethod (1)
- UndefinedConversionError (1)
- [] (12)
- []= (3)
-
_ _ callee _ _ (1) -
_ _ method _ _ (1) -
_ _ send _ _ (2) -
_ dump (1) - abort (2)
-
absolute
_ path (2) -
add
_ trace _ func (1) -
alias
_ method (1) -
all
_ symbols (1) - allocate (1)
- ancestors (1)
- append (1)
-
append
_ features (1) - args (1)
- arity (2)
- at (1)
-
at
_ exit (1) - attr (3)
-
attr
_ accessor (1) -
attr
_ reader (1) -
attr
_ writer (1) - autoclose? (1)
- autoload (2)
- autoload? (1)
- backtrace (2)
-
backtrace
_ locations (1) -
base
_ label (2) - begin (3)
- bind (1)
- binding (3)
- binmode (1)
-
block
_ given? (1) - blockdev? (1)
- broadcast (1)
- call (3)
-
callee
_ id (1) - caller (3)
-
caller
_ locations (2) - catch (2)
- cause (1)
- chardev? (1)
- chdir (4)
- chunk (1)
-
class
_ eval (2) -
class
_ exec (1) -
class
_ variable _ defined? (1) -
class
_ variable _ get (1) -
class
_ variable _ set (1) -
class
_ variables (1) - clone (3)
- close (1)
-
close
_ read (1) -
close
_ write (1) - coerce (1)
-
const
_ defined? (1) -
const
_ get (1) -
const
_ missing (1) -
const
_ set (1) - constants (2)
- cover? (2)
- crypt (1)
- curry (2)
-
default
_ proc= (1) -
define
_ finalizer (2) -
define
_ method (2) -
define
_ singleton _ method (2) -
defined
_ class (1) - delete (1)
-
delete
_ suffix (1) -
delete
_ suffix! (1) - deq (2)
- disable (2)
- disasm (1)
- disassemble (1)
- display (1)
- div (1)
- dup (2)
- each (12)
-
each
_ byte (4) -
each
_ codepoint (2) -
each
_ entry (2) -
each
_ index (2) -
each
_ key (2) -
each
_ line (6) -
each
_ pair (2) -
each
_ with _ index (2) - enable (2)
-
end
_ with? (1) -
enum
_ for (4) - eql? (1)
- errno (1)
-
error
_ bytes (1) -
error
_ char (1) - eval (3)
-
eval
_ script (1) - event (1)
- exception (2)
-
exclude
_ end? (2) - exit (2)
- exit! (1)
-
exit
_ value (1) - extend (1)
-
extend
_ object (1) - extended (1)
- fail (3)
- fcntl (1)
- fdatasync (1)
- feed (1)
- fetch (3)
- first (2)
-
first
_ lineno (1) -
fixed
_ encoding? (1) - flush (1)
- fork (3)
- format (1)
- freeze (1)
- gamma (1)
- gets (1)
-
handle
_ interrupt (1) - hash (2)
- include (1)
- include? (1)
- included (1)
-
included
_ modules (1) -
incomplete
_ input? (1) - inherited (1)
- initialize (1)
-
initialize
_ copy (1) -
inplace
_ mode= (1) - inspect (6)
-
instance
_ eval (2) -
instance
_ exec (1) -
instance
_ method (1) -
instance
_ methods (1) -
instance
_ of? (1) -
instance
_ variable _ defined? (1) -
instance
_ variable _ get (1) -
instruction
_ sequence (1) -
internal
_ encoding (1) - invert (1)
-
is
_ a? (1) - iterator? (1)
- key (1)
- kill (2)
-
kind
_ of? (1) - label (1)
- lambda (2)
- lambda? (1)
- last (2)
-
last
_ match (2) - lazy (1)
- lineno (1)
- list (1)
-
local
_ variable _ defined? (1) -
local
_ variable _ get (1) -
local
_ variable _ set (1) -
local
_ variables (2) - loop (2)
- lstat (1)
- main (1)
-
marshal
_ dump (1) - match (2)
- max (4)
-
max
_ by (4) - merge (2)
-
method
_ added (1) -
method
_ defined? (1) -
method
_ id (1) -
method
_ missing (1) -
method
_ removed (1) -
method
_ undefined (1) - methods (1)
- min (4)
-
module
_ eval (2) -
module
_ exec (1) -
module
_ function (1) - name (3)
- nesting (1)
- new (14)
- next (1)
-
next
_ values (1) - of (2)
- offset (2)
- open (4)
-
original
_ name (2) - owned? (1)
- owner (1)
- pack (2)
- parameters (1)
- pass (1)
- path (5)
-
peek
_ values (1) -
pending
_ interrupt? (2) - pid (1)
- pipe (8)
- pop (2)
- popen (14)
- pos (1)
- pos= (2)
- pread (1)
- prepend (4)
-
prepend
_ features (1) - prepended (1)
-
primitive
_ convert (4) - print (1)
- priority (1)
- priority= (1)
- private (1)
-
private
_ class _ method (1) -
private
_ constant (1) -
private
_ instance _ methods (1) -
private
_ method _ defined? (1) - proc (2)
-
protected
_ method _ defined? (1) - public (1)
-
public
_ class _ method (1) -
public
_ constant (1) -
public
_ method _ defined? (1) -
public
_ send (2) - push (1)
- pwrite (1)
- raise (4)
-
raised
_ exception (1) - rand (3)
- read (1)
- readbyte (2)
- readchar (1)
- readline (1)
- reason (1)
- receiver (3)
- refine (1)
-
remove
_ class _ variable (1) -
remove
_ const (1) -
remove
_ instance _ variable (1) -
remove
_ method (1) - rename (1)
- replace (1)
- require (1)
-
require
_ relative (1) -
respond
_ to? (1) -
respond
_ to _ missing? (1) - result (1)
- resume (1)
-
return
_ value (1) - rewind (1)
- seek (2)
- select (1)
- send (2)
-
set
_ backtrace (1) -
set
_ trace _ func (2) - setgid? (1)
- setpgrp (1)
- setpriority (1)
- setuid? (1)
- shift (2)
- signal (1)
- signm (1)
- signo (1)
-
singleton
_ class? (1) -
singleton
_ method (1) -
singleton
_ method _ added (1) -
singleton
_ method _ removed (1) -
singleton
_ method _ undefined (1) -
singleton
_ methods (1) - size (1)
- sleep (3)
- socket? (1)
-
sort
_ by (2) -
source
_ location (1) - sprintf (1)
- start (1)
-
start
_ with? (1) - stat (1)
- status (1)
- step (9)
- sticky? (1)
- success? (1)
- sum (1)
-
super
_ method (1) - superclass (1)
- switch (4)
- sync (1)
- synchronize (1)
- sysseek (1)
- syswrite (1)
- tag (1)
- tell (1)
- terminate (1)
- test (2)
-
thread
_ variable _ set (1) - throw (1)
-
to
_ a (1) -
to
_ ary (2) -
to
_ enum (4) -
to
_ h (2) -
to
_ hash (1) -
to
_ int (1) -
to
_ path (1) -
to
_ proc (2) -
to
_ regexp (1) -
to
_ s (7) -
to
_ str (1) - trap (2)
- truncate (1)
-
try
_ convert (1) - unbind (1)
-
undef
_ method (1) -
undefine
_ finalizer (1) - unlink (1)
- unlock (1)
- unpack (1)
- unshift (1)
- upto (1)
-
used
_ modules (1) - using (1)
- value (1)
- warn (2)
-
with
_ object (2) - write (1)
- yield (3)
- ~ (1)
検索結果
先頭5件
- IO
. popen(env = {} , [[cmdname , arg0] , *args , execopt={}] , mode = "r" , opt={}) {|f| . . . } -> object - IO
. popen(env = {} , [cmdname , *args , execopt={}] , mode = "r" , opt={}) -> IO - IO
. popen(env = {} , [cmdname , *args , execopt={}] , mode = "r" , opt={}) {|f| . . . } -> object - IO
. popen(env = {} , command , mode = "r" , opt={}) -> IO - IO
. popen(env = {} , command , mode = "r" , opt={}) {|f| . . . } -> object
-
IO
. popen(env = {} , [[cmdname , arg0] , *args , execopt={}] , mode = "r" , opt={}) {|f| . . . } -> object (24013.0) -
サブプロセスを実行し、そのプロセスの標準入出力 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。
サブプロセスを実行し、そのプロセスの標準入出力
との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。
p io = IO.popen("cat", "r+") # => #<IO:fd 4>
io.puts "foo"
io.close_write
p io.gets # => "foo\n"
サブプロセスを指定する方法は2通りあります。文字列を指定する場合と配列を指定する場合です。
文字列の場合は、シェルを経由して子プロセスを実行し、
配列の場合は、シェルを経由せずに子プロセスを実行します。
... -
IO
. popen(env = {} , [cmdname , *args , execopt={}] , mode = "r" , opt={}) -> IO (24013.0) -
サブプロセスを実行し、そのプロセスの標準入出力 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。
サブプロセスを実行し、そのプロセスの標準入出力
との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。
p io = IO.popen("cat", "r+") # => #<IO:fd 4>
io.puts "foo"
io.close_write
p io.gets # => "foo\n"
サブプロセスを指定する方法は2通りあります。文字列を指定する場合と配列を指定する場合です。
文字列の場合は、シェルを経由して子プロセスを実行し、
配列の場合は、シェルを経由せずに子プロセスを実行します。
... -
IO
. popen(env = {} , [cmdname , *args , execopt={}] , mode = "r" , opt={}) {|f| . . . } -> object (24013.0) -
サブプロセスを実行し、そのプロセスの標準入出力 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。
サブプロセスを実行し、そのプロセスの標準入出力
との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。
p io = IO.popen("cat", "r+") # => #<IO:fd 4>
io.puts "foo"
io.close_write
p io.gets # => "foo\n"
サブプロセスを指定する方法は2通りあります。文字列を指定する場合と配列を指定する場合です。
文字列の場合は、シェルを経由して子プロセスを実行し、
配列の場合は、シェルを経由せずに子プロセスを実行します。
... -
IO
. popen(env = {} , command , mode = "r" , opt={}) -> IO (24013.0) -
サブプロセスを実行し、そのプロセスの標準入出力 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。
サブプロセスを実行し、そのプロセスの標準入出力
との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。
p io = IO.popen("cat", "r+") # => #<IO:fd 4>
io.puts "foo"
io.close_write
p io.gets # => "foo\n"
サブプロセスを指定する方法は2通りあります。文字列を指定する場合と配列を指定する場合です。
文字列の場合は、シェルを経由して子プロセスを実行し、
配列の場合は、シェルを経由せずに子プロセスを実行します。
... -
IO
. popen(env = {} , command , mode = "r" , opt={}) {|f| . . . } -> object (24013.0) -
サブプロセスを実行し、そのプロセスの標準入出力 との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。
サブプロセスを実行し、そのプロセスの標準入出力
との間にパイプラインを確立します。生成したパイプを IO オブジェクトとして返します。
p io = IO.popen("cat", "r+") # => #<IO:fd 4>
io.puts "foo"
io.close_write
p io.gets # => "foo\n"
サブプロセスを指定する方法は2通りあります。文字列を指定する場合と配列を指定する場合です。
文字列の場合は、シェルを経由して子プロセスを実行し、
配列の場合は、シェルを経由せずに子プロセスを実行します。
... -
Struct
. [](*args) -> Struct (24013.0) -
(このメソッドは Struct の下位クラスにのみ定義されています) 構造体オブジェクトを生成して返します。
(このメソッドは Struct の下位クラスにのみ定義されています)
構造体オブジェクトを生成して返します。
@param args 構造体の初期値を指定します。メンバの初期値は指定されなければ nil です。
@return 構造体クラスのインスタンス。
@raise ArgumentError 構造体のメンバの数よりも多くの引数を指定した場合に発生します。
//emlist[例][ruby]{
Foo = Struct.new(:foo, :bar)
foo = Foo.new(1)
p foo.values # => [1, nil]
//} -
Struct
. new(*args) -> Struct (24013.0) -
(このメソッドは Struct の下位クラスにのみ定義されています) 構造体オブジェクトを生成して返します。
(このメソッドは Struct の下位クラスにのみ定義されています)
構造体オブジェクトを生成して返します。
@param args 構造体の初期値を指定します。メンバの初期値は指定されなければ nil です。
@return 構造体クラスのインスタンス。
@raise ArgumentError 構造体のメンバの数よりも多くの引数を指定した場合に発生します。
//emlist[例][ruby]{
Foo = Struct.new(:foo, :bar)
foo = Foo.new(1)
p foo.values # => [1, nil]
//} -
Kernel
. # test(cmd , file) -> bool | Time | Integer | nil (24010.0) -
単体のファイルでファイルテストを行います。
単体のファイルでファイルテストを行います。
@param cmd 以下に示す文字リテラル、文字列、あるいは同じ文字を表す数値
です。文字列の場合はその先頭の文字だけをコマンドとみなします。
@param file テストするファイルのパスを表す文字列か IO オブジェクトを指定します。
@return 下表に特に明記していないものは、真偽値を返します。
以下は cmd として指定できる文字リテラルとその意味です。
: ?r
ファイルを実効 uid で読むことができる
: ?w
ファイルに実効 uid で書くことができる
: ?x
ファイルを... -
MatchData
# [](n) -> String | nil (24010.0) -
n 番目の部分文字列を返します。
n 番目の部分文字列を返します。
0 はマッチ全体を意味します。
n の値が負の時には末尾からのインデックスと見倣します(末尾の
要素が -1 番目)。n 番目の要素が存在しない時には nil を返します。
@param n 返す部分文字列のインデックスを指定します。
//emlist[例][ruby]{
/(foo)(bar)(BAZ)?/ =~ "foobarbaz"
p $~.to_a # => ["foobar", "foo", "bar", nil]
p $~[0] # => "foobar"
p $~[1] # => "foo"
... -
MatchData
# [](name) -> String | nil (24010.0) -
name という名前付きグループにマッチした文字列を返します。
name という名前付きグループにマッチした文字列を返します。
@param name 名前(シンボルか文字列)
@raise IndexError 指定した名前が正規表現内に含まれていない場合に発生します
//emlist[例][ruby]{
/\$(?<dollars>\d+)\.(?<cents>\d+)/.match("$3.67")[:cents] # => "67"
/(?<alpha>[a-zA-Z]+)|(?<num>\d+)/.match("aZq")[:num] # => nil
//} -
MatchData
# [](start , length) -> [String] (24010.0) -
start 番目から length 個の要素を含む部分配列を返します。
start 番目から length 個の要素を含む部分配列を返します。
//emlist[例][ruby]{
/(foo)(bar)/ =~ "foobarbaz"
p $~[0, 3] # => ["foobar", "foo", "bar"]
//}
@see Array#[] -
Range
# first(n) -> [object] (24010.0) -
最初の n 要素を返します。範囲内に要素が含まれない場合は空の配列を返します。
最初の n 要素を返します。範囲内に要素が含まれない場合は空の配列を返します。
@param n 取得する要素数を整数で指定します。整数以外のオブジェクトを指定
した場合は to_int メソッドによる暗黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
@raise ArgumentError n に負の数を指定した場合に発生します。
//emlist[例][ruby]{
(10..20).first(3) # => [10, 11, 1... -
Regexp
. last _ match -> MatchData (24010.0) -
カレントスコープで最後に行った正規表現マッチの MatchData オ ブジェクトを返します。このメソッドの呼び出しは $~ の参照と同じです。
カレントスコープで最後に行った正規表現マッチの MatchData オ
ブジェクトを返します。このメソッドの呼び出しは $~
の参照と同じです。
//emlist[例][ruby]{
/(.)(.)/ =~ "ab"
p Regexp.last_match # => #<MatchData:0x4599e58>
p Regexp.last_match[0] # => "ab"
p Regexp.last_match[1] # => "a"
p Regexp.last_match[2] # => "b"
p Regexp.last_match[3] # => nil...