1088件ヒット
[1-100件を表示]
(0.102秒)
別のキーワード
クラス
-
ARGF
. class (96) - BasicObject (12)
- Binding (19)
- Class (12)
- Dir (23)
- File (72)
-
File
:: Stat (348) - IO (382)
- Method (26)
- Object (12)
- Proc (14)
-
RubyVM
:: InstructionSequence (48) - String (12)
モジュール
- Enumerable (12)
キーワード
- << (14)
- <=> (12)
- >> (14)
-
absolute
_ path (12) -
base
_ label (12) - birthtime (12)
- blksize (12)
- blocks (12)
- chardev? (12)
- chown (12)
- chunk (12)
- closed? (12)
- count (12)
- dev (12)
-
dev
_ major (12) -
dev
_ minor (12) - directory? (12)
- each (69)
-
each
_ byte (12) -
each
_ codepoint (12) -
each
_ line (69) - eval (12)
-
executable
_ real? (12) -
external
_ encoding (12) - fcntl (12)
- filename (12)
- fileno (23)
- flock (12)
- ftype (12)
- getbyte (12)
- getc (12)
- gid (12)
- grpowned? (12)
- ino (12)
-
inplace
_ mode= (12) -
instance
_ eval (12) -
internal
_ encoding (12) - label (12)
- mode (12)
- nlink (12)
- parameters (12)
- path (36)
- pos (12)
- pread (8)
- pwrite (8)
- rdev (12)
-
rdev
_ major (12) -
rdev
_ minor (12) - read (12)
- readable? (12)
-
readable
_ real? (12) - readbyte (24)
- readchar (12)
- readlines (36)
- reopen (36)
-
respond
_ to? (12) - size (24)
- size? (12)
-
source
_ location (7) - superclass (12)
- syswrite (12)
- tell (12)
-
to
_ i (12) -
to
_ path (12) - truncate (12)
- uid (12)
-
world
_ readable? (12) -
world
_ writable? (12) - writable? (12)
-
writable
_ real? (12) - write (12)
- zero? (12)
検索結果
先頭5件
-
ARGF
. class # file -> IO (21156.0) -
現在開いている処理対象の File オブジェクト(または IO オブジェ クト)を返します。
...ている処理対象の File オブジェクト(または IO オブジェ
クト)を返します。
$ echo "foo" > foo
$ echo "bar" > bar
$ ruby argf.rb foo bar
ARGF.file # => #<File:foo>
ARGF.read(5) # => "foo\nb"
ARGF.file # => #<File:bar>
ARGFが現在開いている... -
File
:: Stat # readable _ real? -> bool (15221.0) -
実ユーザ/実グループによって読み込み可能な時に真を返します。
...実ユーザ/実グループによって読み込み可能な時に真を返します。
//emlist[][ruby]{
p File::Stat.new($0).readable_real? #=> true
//}... -
File
# truncate(length) -> 0 (15121.0) -
ファイルのサイズを最大 length バイトにします。
...外
Errno::EXXX が発生します。
@raise IOError 自身が書き込み用にオープンされていなければ発生します。
@raise Errno::EXXX サイズの変更に失敗した場合に発生します。
//emlist[例][ruby]{
IO.write("testfile", "1234567890")
File.open("testfile", "a")......do |f|
f.truncate(5) # => 0
f.size # => 5
end
//}... -
RubyVM
:: InstructionSequence # absolute _ path -> String | nil (12115.0) -
self が表す命令シーケンスの絶対パスを返します。
...irb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.absolute_path
# => nil
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts "hello, wor......ld"
end
# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.absolute_path # => "/tmp/method.rb"
@see RubyVM::InstructionSequence#path... -
RubyVM
:: InstructionSequence # base _ label -> String (12115.0) -
self が表す命令シーケンスの基本ラベルを返します。
...す。
例1:irb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.base_label
# => "<compiled>"
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello......lo, world"
end
# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.base_label # => "<main>"
例3:
# /tmp/method2.rb
def hello
puts "hello, world"
end
RubyVM::InstructionSequence.of(method(:hello)).base_label
# => "hello"
@see RubyVM::Instructio... -
RubyVM
:: InstructionSequence # label -> String (12115.0) -
self が表す命令シーケンスのラベルを返します。通常、メソッド名、クラス名、 モジュール名などで構成されます。
...rb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.label
# => "<compiled>"
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts "hello, wor......ld"
end
# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.label # => "<main>"
例3:
# /tmp/method2.rb
def hello
puts "hello, world"
end
RubyVM::InstructionSequence.of(method(:hello)).label
# => "hello"
@see RubyVM::InstructionSequence#base_la... -
RubyVM
:: InstructionSequence # path -> String (12115.0) -
self が表す命令シーケンスの相対パスを返します。
...irb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.path
# => "<compiled>"
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts "hello, wor......ld"
end
# irb
> iseq = RubyVM::InstructionSequence.compile_file('method.rb')
> iseq.path # => "method.rb"
@see RubyVM::InstructionSequence#absolute_path... -
File
# flock(operation) -> 0 | false (9289.0) -
ファイルをロックします。
...クの取得に成功した場合は 0 を返します。
File::LOCK_NB (ノンブロッキング) を指定すると、本来ならブロックされる場合に
ブロックされずに false を返すようになります。
@param operation ロックに対する操作の種類を示す定数を......@raise IOError 自身が close されている場合に発生します。
@raise Errno::EXXX operation に不正な整数を与えた場合などに発生します。
引数 operation に有効な定数は以下の通りです。定数は File::Constants で定義されていますが、
File......クラスの親クラスの IO が File::Constants をインクルードしているので、
これらの定数は File::LOCK_SH などとして参照可能です。
: LOCK_SH
共有ロック。複数のプロセスが同時にロックを共有できます。
システムによってはロッ... -
File
:: Stat # dev _ major -> Integer (9221.0) -
dev の major 番号部を返します。
...dev の major 番号部を返します。
//emlist[][ruby]{
fs = File::Stat.new($0)
p fs.dev_major
#例
#=> nil #この場合ではシステムでサポートされていないため
//}...