1054件ヒット
[201-300件を表示]
(0.081秒)
ライブラリ
- ビルトイン (620)
- fiber (8)
- fiddle (12)
-
json
/ add / bigdecimal (12) -
json
/ add / complex (12) -
json
/ add / date (12) -
json
/ add / date _ time (12) -
json
/ add / exception (12) -
json
/ add / range (12) -
json
/ add / rational (12) -
json
/ add / regexp (12) -
json
/ add / struct (12) -
json
/ add / time (12) - optparse (96)
- pathname (72)
- rake (36)
- ripper (24)
- set (18)
- un (12)
- win32ole (36)
クラス
- BasicObject (48)
- BigDecimal (12)
- Class (24)
- Complex (12)
- Data (3)
- Date (12)
- DateTime (12)
- Enumerator (108)
-
Enumerator
:: Lazy (72) - Exception (12)
- Fiber (12)
-
Fiddle
:: Function (12) - Method (66)
- Module (36)
- Object (120)
- OptionParser (96)
- Pathname (72)
- Proc (6)
- Range (12)
- Rational (12)
- Regexp (12)
- Ripper (24)
-
RubyVM
:: InstructionSequence (12) - String (12)
- Struct (12)
- Time (12)
- UnboundMethod (12)
- WIN32OLE (24)
-
WIN32OLE
_ EVENT (12)
モジュール
- Enumerable (115)
- FileUtils (12)
- Kernel (12)
-
Rake
:: TaskManager (24)
キーワード
- % (12)
- === (8)
- [] (12)
-
_ _ send _ _ (24) - allocate (12)
-
bind
_ call (12) - binread (12)
- call (36)
-
class
_ exec (12) -
create
_ rule (12) - curry (22)
-
define
_ task (12) - each (48)
-
each
_ line (24) -
each
_ with _ index (24) -
each
_ with _ object (24) - entries (12)
-
enum
_ for (48) - fnmatch (12)
- force (12)
- handler= (12)
- initialize (12)
-
instance
_ exec (12) - join (12)
-
method
_ missing (12) - mkmf (12)
-
module
_ exec (12) - new (12)
-
next
_ values (12) - order (48)
- parse (24)
- permute (24)
-
public
_ send (24) -
respond
_ to _ missing? (12) -
ruby2
_ keywords (18) - send (24)
- setproperty (24)
-
to
_ a (24) -
to
_ enum (48) -
to
_ h (19) -
to
_ json (120) -
to
_ set (24) - transfer (12)
- warn (12)
- warning (12)
- with (3)
-
with
_ index (36) -
with
_ object (24)
検索結果
先頭5件
-
Pathname
# each _ line(*args) -> Enumerator (143.0) -
IO.foreach(self.to_s, *args, &block) と同じです。
...IO.foreach(self.to_s, *args, &block) と同じです。
//emlist[例][ruby]{
require "pathname"
IO.write("testfile", "line1\nline2,\nline3\n")
Pathname("testfile").each_line
# => #<Enumerator: IO:foreach("testfile")>
//}
//emlist[例 ブロックを指定][ruby]{
require "pathname"
IO.write("tes......"
//}
//emlist[例 limit を指定][ruby]{
require "pathname"
IO.write("testfile", "line1\nline2,\nline3\n")
Pathname("testfile").each_line(4) {|f| p f }
# => "line"
# => "1\n"
# => "line"
# => "2,\n"
# => "line"
# => "3\n"
//}
//emlist[例 sep を指定][ruby]{
require "pathname"
IO.write("tes... -
Pathname
# each _ line(*args) {|line| . . . } -> nil (143.0) -
IO.foreach(self.to_s, *args, &block) と同じです。
...IO.foreach(self.to_s, *args, &block) と同じです。
//emlist[例][ruby]{
require "pathname"
IO.write("testfile", "line1\nline2,\nline3\n")
Pathname("testfile").each_line
# => #<Enumerator: IO:foreach("testfile")>
//}
//emlist[例 ブロックを指定][ruby]{
require "pathname"
IO.write("tes......"
//}
//emlist[例 limit を指定][ruby]{
require "pathname"
IO.write("testfile", "line1\nline2,\nline3\n")
Pathname("testfile").each_line(4) {|f| p f }
# => "line"
# => "1\n"
# => "line"
# => "2,\n"
# => "line"
# => "3\n"
//}
//emlist[例 sep を指定][ruby]{
require "pathname"
IO.write("tes... -
Fiddle
:: Function # call(*args) -> Integer|DL :: CPtr|nil (138.0) -
関数を呼び出します。
...出します。
Fiddle::Function.new で指定した引数と返り値の型に基いて
Ruby のオブジェクトを適切に C のデータに変換して C の関数を呼び出し、
その返り値を Ruby のオブジェクトに変換して返します。
引数の変換は以下の通り......g
Ruby の整数を C の整数に変換します。
: double/float
Ruby の整数 or 浮動小数点数を C の浮動小数点数に変換します
返り値の変換は以下の通りです。
: void
nil を返します
: (unsigned) char/short/int/long/long long
C の整数を Ruby......の整数に変換します
: void*(つまり任意のポインタ型)
C のポインタを保持した Fiddle::Pointer を返します。
@param args 関数の引数
@see Fiddle::Function.new... -
Pathname
# join(*args) -> Pathname (138.0) -
与えられたパス名を連結します。
...結します。
@param args 連結したいディレクトリ名やファイル名を文字列で与えます。
//emlist[例][ruby]{
require "pathname"
path0 = Pathname("/usr") # Pathname:/usr
path0 = path0.join("bin/ruby") # Pathname:/usr/bin/ruby
# 上記の path0......の処理は下記の path1 と同様のパスになります
path1 = Pathname("/usr") + "bin/ruby" # Pathname:/usr/bin/ruby
path0 == path1 #=> true
//}... -
Object
# public _ send(name , *args) -> object (137.0) -
オブジェクトの public メソッド name を args を引数にして呼び出し、メソッ ドの実行結果を返します。
...オブジェクトの public メソッド name を args を引数にして呼び出し、メソッ
ドの実行結果を返します。
ブロック付きで呼ばれたときはブロックもそのまま引き渡します。
//emlist[][ruby]{
1.public_send(:+, 2) # => 3
//}
@param name 文字......aram args 呼び出すメソッドに渡す引数です。
@raise ArgumentError name を指定しなかった場合に発生します。
@raise NoMethodError protected メソッドや private メソッドに対して実行
した場合に発生します。
//emlist[][ruby]{
1... -
Object
# public _ send(name , *args) { . . . . } -> object (137.0) -
オブジェクトの public メソッド name を args を引数にして呼び出し、メソッ ドの実行結果を返します。
...オブジェクトの public メソッド name を args を引数にして呼び出し、メソッ
ドの実行結果を返します。
ブロック付きで呼ばれたときはブロックもそのまま引き渡します。
//emlist[][ruby]{
1.public_send(:+, 2) # => 3
//}
@param name 文字......aram args 呼び出すメソッドに渡す引数です。
@raise ArgumentError name を指定しなかった場合に発生します。
@raise NoMethodError protected メソッドや private メソッドに対して実行
した場合に発生します。
//emlist[][ruby]{
1... -
Module
# class _ exec(*args) {|*vars| . . . } -> object (131.0) -
与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。
...与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。
モジュールのコンテキストで評価するとは、実行中そのモジュールが self になるということです。
つまり、そのモジュールの......変数、定数とクラス変数のスコープはブロックの外側のスコープになります。
@param args ブロックに渡す引数を指定します。
//emlist[例][ruby]{
class Thing
end
c = 1
Thing.class_exec{
def hello()
"Hello there!"
end
define_method(:foo) do... -
Module
# module _ exec(*args) {|*vars| . . . } -> object (131.0) -
与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。
...与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。
モジュールのコンテキストで評価するとは、実行中そのモジュールが self になるということです。
つまり、そのモジュールの......変数、定数とクラス変数のスコープはブロックの外側のスコープになります。
@param args ブロックに渡す引数を指定します。
//emlist[例][ruby]{
class Thing
end
c = 1
Thing.class_exec{
def hello()
"Hello there!"
end
define_method(:foo) do... -
UnboundMethod
# bind _ call(recv , *args) -> object (131.0) -
self を recv に bind して args を引数として呼び出します。
...self を recv に bind して args を引数として呼び出します。
self.bind(recv).call(*args) と同じ意味です。
//emlist[][ruby]{
puts Kernel.instance_method(:inspect).bind_call(BasicObject.new) # => #<BasicObject:0x000055c65e8ea7b8>
//}
@see UnboundMethod#bind, Method#call...