203件ヒット
[101-200件を表示]
(0.081秒)
ライブラリ
- ビルトイン (143)
- continuation (12)
- pathname (12)
- rake (24)
-
rubygems
/ commands / lock _ command (12)
キーワード
- BasicObject (12)
- Binding (12)
- Complex (12)
- Continuation (12)
- DefaultLoader (12)
- File (12)
- LoadError (12)
- Location (12)
- LockCommand (12)
- Pathname (12)
- Proc (12)
- Rational (12)
- RuntimeError (12)
- Task (12)
- ThreadError (12)
- TracePoint (12)
- UncaughtThrowError (11)
検索結果
-
Rake
:: Task (13.0) -
タスクは Rakefile における基本単位です。
...ンと事前タスクを持ちます。
タスクを実行すると、まず始めに全ての事前タスクを一度だけ実行してから
自身のアクションを実行します。
タスクは通常 Kernel#task, Kernel#file という便利なメソッドを使用して定義します。... -
ThreadError (13.0)
-
Thread 関連のエラーが起きたときに発生します。
...いは Thread#run しようとしたとき
* スレッドが一つしかないのに Thread.stop しようとしたとき
* Kernel.#throw がスレッド内で Kernel.#catch されないとき
* スレッドから return しようとしたとき
* イテレータを与えずにスレッド... -
BasicObject (7.0)
-
特殊な用途のために意図的にほとんど何も定義されていないクラスです。 Objectクラスの親にあたります。Ruby 1.9 以降で導入されました。
...スは Object クラスからほとんどのメソッドを取り除いたクラスです。
Object クラスは様々な便利なメソッドや Kernel から受け継いだ関数的メソッド
を多数有しています。
これに対して、 BasicObject クラスはオブジェクトの同......クラスから派生すべきです。
真に必要な場合にだけ BasicObject から派生してください。
=== 例
//emlist[例][ruby]{
class Proxy < BasicObject
def initialize(target)
@target = target
end
def method_missing(message, *args)
@target.__send__(message, *args... -
Complex (7.0)
-
複素数を扱うクラスです。
...複素数を扱うクラスです。
Complex オブジェクトを作成するには、Kernel.#Complex、
Complex.rect、Complex.polar、Numeric#to_c、
String#to_c のいずれかを使用します。
//emlist[Complex オブジェクトの作り方][ruby]{
Complex(1) # => (1+0i)
Complex... -
Continuation (7.0)
-
継続を表すクラスです。
...継続を表すクラスです。
Kernel.#callcc { |cont| ... } の呼び出し
は、直前の状態(ローカル変数の定義、スタックフレーム)を cont に記憶
してブロックを実行します。cont は、Continuation クラスのインスタ
ンスで、Continuation#call メ... -
File (7.0)
-
ファイルアクセスのためのクラスです。
...ファイルアクセスのためのクラスです。
通常 Kernel.#open または File.open を使って生成します。
IO クラスがインクルードしている File::Constants は File クラスに関係する定数を
格納したモジュールです。
また File::Stat は stat 構... -
Pathname (7.0)
-
パス名をオブジェクト指向らしく扱うクラスです。
...に
ファイルシステムにアクセスするものもあります。
Pathname オブジェクトの生成には、Pathname.new のほかに Kernel#Pathname も使えます。
//emlist[例][ruby]{
require 'pathname'
Pathname.new("foo/bar") # => #<Pathname:foo/bar>
Pathname("foo/bar") # =>... -
Rational (7.0)
-
有理数を扱うクラスです。
...扱うクラスです。
「1/3」のような有理数を扱う事ができます。Integer や Float
と同様に Rational.new ではなく、 Kernel.#Rational を使用して
Rational オブジェクトを作成します。
//emlist[例][ruby]{
Rational(1, 3) # => (1/3)
Rational('1/3')... -
Thread
:: Backtrace :: Location (7.0) -
Ruby のフレームを表すクラスです。
...Ruby のフレームを表すクラスです。
Kernel.#caller_locations から生成されます。
//emlist[例1][ruby]{
# caller_locations.rb
def a(skip)
caller_locations(skip)
end
def b(skip)
a(skip)
end
def c(skip)
b(skip)
end
c(0..2).map do |call|
puts call.to_s
end
//}
例1の実......行結果:
caller_locations.rb:2:in `a'
caller_locations.rb:5:in `b'
caller_locations.rb:8:in `c'
//emlist[例2][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.to...
