1306件ヒット
[1-100件を表示]
(0.085秒)
ライブラリ
- ビルトイン (780)
- etc (12)
-
fiddle
/ import (12) - json (60)
-
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 (48)
- rake (12)
-
rdoc
/ top _ level (12) - resolv (24)
-
rexml
/ document (24) -
rexml
/ streamlistener (12) - tsort (58)
-
webrick
/ httpservlet / abstract (72) -
webrick
/ httputils (36) -
win32
/ registry (12) - win32ole (12)
クラス
-
ARGF
. class (216) - BigDecimal (12)
- Class (12)
- Complex (12)
- Date (12)
- DateTime (12)
-
Etc
:: Passwd (12) - Exception (12)
- FalseClass (24)
- Method (36)
- Module (192)
- NilClass (12)
- Object (72)
- OptionParser (48)
-
RDoc
:: TopLevel (12) -
REXML
:: CData (24) - Range (12)
- Rational (12)
- Regexp (12)
-
Resolv
:: DNS (24) -
RubyVM
:: InstructionSequence (12) - String (12)
- Struct (12)
- Thread (36)
-
Thread
:: Backtrace :: Location (48) - Time (12)
- TracePoint (36)
- TrueClass (60)
-
WEBrick
:: HTTPServlet :: AbstractServlet (72) -
WEBrick
:: HTTPUtils :: FormData (36) -
WIN32OLE
_ TYPE (12) -
Win32
:: Registry :: PredefinedKey (12)
モジュール
- Enumerable (24)
-
Fiddle
:: Importer (12) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (12) -
JSON
:: Generator :: GeneratorMethods :: NilClass (12) -
JSON
:: Generator :: GeneratorMethods :: Object (12) -
JSON
:: Generator :: GeneratorMethods :: String (12) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (12) -
REXML
:: StreamListener (12) - TSort (58)
キーワード
- & (12)
- [] (12)
- ^ (12)
-
_ dump (12) -
_ load (12) -
absolute
_ path (12) - accept (12)
-
add
_ trace _ func (12) - attr (12)
-
attr
_ accessor (4) -
attr
_ reader (4) -
attr
_ writer (4) - backtrace (12)
-
base
_ label (12) -
callee
_ id (12) -
class
_ variables (12) -
const
_ defined? (12) -
const
_ get (12) -
const
_ source _ location (12) - constants (12)
-
defined
_ class (12) -
do
_ DELETE (12) -
do
_ GET (12) -
do
_ HEAD (12) -
do
_ OPTIONS (12) -
do
_ POST (12) -
do
_ PUT (12) -
each
_ entry (24) -
each
_ strongly _ connected _ component (23) -
each
_ strongly _ connected _ component _ from (23) - entitydecl (12)
- filename (24)
-
find
_ local _ symbol (12) - getc (12)
- getresource (12)
- getresources (12)
- gets (36)
-
inplace
_ mode (12) - inspect (84)
-
instance
_ methods (12) -
method
_ defined? (12) -
method
_ id (12) - methods (12)
- name (24)
-
ole
_ type (12) - on (36)
- path (12)
- pathmap (12)
- private (12)
-
private
_ method _ defined? (12) -
protected
_ method _ defined? (12) -
public
_ method _ defined? (12) - read (12)
-
read
_ nonblock (12) - readchar (12)
- readline (36)
- readpartial (12)
-
set
_ encoding (12) -
set
_ trace _ func (12) -
singleton
_ methods (12) -
source
_ location (12) -
strongly
_ connected _ components (12) - struct (12)
-
to
_ a (12) -
to
_ json (168) -
to
_ json _ raw _ object (12) -
to
_ s (108) -
to
_ str (12) - uclass (12)
- value (12)
- write (12)
- | (12)
検索結果
先頭5件
-
Win32
:: Registry :: PredefinedKey # class (21102.0) -
@todo
@todo -
TracePoint
# defined _ class -> Class | module (9251.0) -
メソッドを定義したクラスかモジュールを返します。
...メソッドを定義したクラスかモジュールを返します。
//emlist[例][ruby]{
class C; def foo; end; end
trace = TracePoint.new(:call) do |tp|
p tp.defined_class # => C
end.enable do
C.new.foo
end
//}
メソッドがモジュールで定義されていた場合も(include に......def foo; end; end
class C; include M; end;
trace = TracePoint.new(:call) do |tp|
p tp.defined_class # => M
end.enable do
C.new.foo
end
//}
[注意] 特異メソッドを実行した場合は TracePoint#defined_class は特異クラ
スを返します。また、Kernel.#set_trace_func の 6 番......はなく元のクラスを返します。
//emlist[例][ruby]{
class C; def self.foo; end; end
trace = TracePoint.new(:call) do |tp|
p tp.defined_class # => #<Class:C>
end.enable do
C.foo
end
//}
Kernel.#set_trace_func と TracePoint の上記の差分に注意して
ください。
@see 508... -
Class
# _ load(str) -> Class (9202.0) -
Object#_dump を参照して下さい。
...Object#_dump を参照して下さい。
@param str Ruby のオブジェクトがダンプされた文字列を指定します。... -
Module
# class _ variables(inherit = true) -> [Symbol] (6232.0) -
クラス/モジュールに定義されているクラス変数の名前の配列を返します。
...ュールのクラス変数を含みます。
//emlist[例][ruby]{
class One
@@var1 = 1
end
class Two < One
@@var2 = 2
end
One.class_variables # => [:@@var1]
Two.class_variables # => [:@@var2, :@@var1]
Two.class_variables(false) # => [:@@var2]
//}
@see Module.constants, Ker... -
Module
# attr(name , true) -> [Symbol] (6207.0) -
インスタンス変数読み取りのためのインスタンスメソッド name を定義します。
...ruby]{
class User
attr :name # => [:name]
# 複数の名前を渡すこともできる
attr :id, :age # => [:id, :age]
end
//}
このメソッドで定義されるアクセスメソッドの定義は次の通りです。
//emlist[例][ruby]{
def name
@name
end
//}
第 2 引数 が true......その定義は次の通りです。
//emlist[例][ruby]{
def name=(val)
@name = val
end
//}
第 2 引数 に true か false を指定する方法は非推奨です。
@param name String または Symbol で指定します。
@return 定義されたメソッド名を Symbol の配列で返し... -
Object
# to _ str -> String (6207.0) -
オブジェクトの String への暗黙の変換が必要なときに内部で呼ばれます。 デフォルトでは定義されていません。
...オブジェクトの String への暗黙の変換が必要なときに内部で呼ばれます。
デフォルトでは定義されていません。
説明のためここに記載してありますが、
このメソッドは実際には Object クラスには定義されていません。
必......面で代置可能であるような、
* 文字列そのものとみなせるようなもの
という厳しいものになっています。
//emlist[][ruby]{
class Foo
def to_str
'Edition'
end
end
it = Foo.new
p('Second' + it) #=> "SecondEdition"
//}
@see Object#to_s,Kernel.#String... -
Thread
# backtrace -> [String] | nil (6207.0) -
スレッドの現在のバックトレースを返します。
...uby]{
class C1
def m1
sleep 5
end
def m2
m1
end
end
th = Thread.new {C1.new.m2; Thread.stop}
th.backtrace
# => [
# [0] "(irb):3:in `sleep'",
# [1] "(irb):3:in `m1'",
# [2] "(irb):6:in `m2'",
# [3] "(irb):10:in `block in irb_binding'"
# ]
th.kill
th.backtrace... -
Fiddle
:: Importer # struct(signature) -> Class (6202.0) -
C の構造体型に対応する Ruby のクラスを構築して返します。
...を
配列で signature に渡してデータを定義します。例えば C における
struct timeval {
long tv_sec;
long tv_usec;
};
という構造体型に対応して
Timeval = struct(["long tv_sec", "long tv_usec"])
として構造体に対応するクラスを生成します......下のメソッドが定義されています
* クラスメソッド malloc
* initialize
* to_ptr
* to_i
* 構造体の各メンバへのアクセサ
返されるクラスは Fiddle::CStruct を継承しています。詳しくは
そちらを参照してください。
@param signature......require 'fiddle/import'
module M
extend Fiddle::Importer
dlload "libc.so.6"
extern "int gettimeofday(void*, void*)"
Timeval = struct(["long tv_sec", "long tv_usec"])
end
time = M::Timeval.malloc
M.gettimeofday(time, Fiddle::NULL)
p time.tv_sec
p time.tv_usec... -
Etc
:: Passwd # uclass -> String (6201.0) -
ユーザアクセスクラス(文字列)を返します。このメンバはシステム依存です。
ユーザアクセスクラス(文字列)を返します。このメンバはシステム依存です。