ライブラリ
- ビルトイン (473)
- csv (22)
- etc (11)
-
fiddle
/ import (132) - json (11)
-
json
/ add / ostruct (11) -
json
/ add / struct (11) - mkmf (22)
- objspace (11)
- openssl (55)
- ostruct (108)
- rake (11)
-
rexml
/ document (110) -
rexml
/ parsers / pullparser (11) -
rexml
/ sax2listener (11) -
rexml
/ streamlistener (11) - socket (66)
- zlib (11)
クラス
- Addrinfo (33)
- Array (28)
- CSV (22)
- Data (2)
-
Fiddle
:: CStruct (55) - Hash (9)
-
OpenSSL
:: ASN1 :: Constructive (33) - OpenStruct (119)
-
REXML
:: Element (11) -
REXML
:: Instruction (88) -
REXML
:: Parsers :: PullEvent (11) -
Rake
:: Application (11) - Range (11)
- RubyVM (11)
-
RubyVM
:: InstructionSequence (225) -
Socket
:: Option (33) - String (11)
- Struct (148)
- TracePoint (6)
モジュール
- Etc (11)
-
Fiddle
:: Importer (66) - Kernel (22)
- ObjectSpace (33)
-
OpenSSL
:: ASN1 (11) -
REXML
:: SAX2Listener (11) -
REXML
:: StreamListener (11)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - == (11)
- CStruct (11)
- CircularDatastructure (11)
- Constructive (11)
-
DATA
_ PTR (11) -
Data
_ Get _ Struct (11) -
Data
_ Make _ Struct (11) -
Data
_ Wrap _ Struct (11) -
INSTRUCTION
_ NAMES (11) - InspectKey (11)
- Instruction (11)
- InstructionSequence (11)
- Marshal フォーマット (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 3 . 0 (9) - RBASIC (11)
- RBIGNUM (11)
- RFILE (11)
- RSTRING (11)
-
SC
_ THREAD _ DESTRUCTOR _ ITERATIONS (11) - ZStream (11)
-
absolute
_ path (11) -
base
_ label (11) - bigdecimal (11)
-
blk
_ copy _ prev (11) -
blk
_ free (11) -
blk
_ mark (11) -
blk
_ orphan (11) -
bm
_ mark (11) - clone (11)
- compile (11)
-
compile
_ file (11) -
compile
_ option (11) -
compile
_ option= (11) - content (11)
- content= (11)
- convert (22)
-
count
_ tdata _ objects (11) -
create
_ value (11) - data (11)
-
deconstruct
_ keys (2) -
delete
_ field (11) - dig (36)
- disasm (22)
- disassemble (22)
-
dyna
_ pop (11) -
dyna
_ push (11) - each (11)
-
each
_ object (22) -
each
_ pair (44) - eval (11)
-
fc
_ i (11) -
fc
_ path (11) -
fiddle
/ import (11) -
fiddle
/ types (11) - filter (12)
-
first
_ lineno (11) -
frame
_ dup (11) -
gvar
_ i (11) - hash (22)
-
have
_ struct _ member (22) - inspect (33)
- instruction (11)
- instruction? (11)
-
instruction
_ sequence (6) - instructions (11)
-
ivar
_ i (11) -
keyword
_ init? (3) - label (11)
- length (11)
- linger (11)
-
load
_ from _ binary (9) -
load
_ from _ binary _ extra _ data (9) - malloc (11)
-
mark
_ global _ entry (11) - modifiable (11)
- new (80)
-
new
_ blktag (11) -
new
_ dvar (11) -
node
_ type (11) - of (11)
- pack (19)
- pack テンプレート文字列 (11)
- path (11)
-
processing
_ instruction (11) -
rb
_ exec (1) -
rb
_ exec _ arg _ addopt (1) -
rb
_ exec _ arg _ fixup (1) -
rb
_ exec _ arg _ init (1) -
rb
_ exec _ err (1) -
rb
_ gc _ mark _ frame (11) -
rb
_ global _ entry (11) -
rb
_ gvar _ defined (11) -
rb
_ reserved _ word (11) -
rb
_ struct _ iv _ get (1) -
rb
_ thread _ select (1) -
rb
_ thread _ wait _ for (11) -
rb
_ time _ timespec _ new (9) -
rb
_ timespec _ now (9) -
remove
_ trace (11) -
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 9 feature (11) -
scope
_ dup (11) - select (22)
- size (22)
- sizeof (11)
-
st
_ init _ table (11) -
st
_ init _ table _ with _ size (11) - tagging (11)
- tagging= (11)
- target (11)
- target= (11)
-
to
_ a (11) -
to
_ binary (9) -
to
_ i (11) -
to
_ json (22) -
to
_ ptr (11) -
to
_ s (44) -
to
_ sockaddr (11) -
trace
_ en (11) -
trace
_ ev (11) - traverse (11)
- typealias (11)
-
undef
_ setter (11) - union (11)
- unpack (11)
-
val
_ setter (11) - value (11)
検索結果
先頭5件
- Fiddle
:: Importer # struct(signature) -> Class - VALUE rb
_ time _ timespec _ new(const struct timespec *ts , int offset) - TracePoint
# instruction _ sequence -> RubyVM :: InstructionSequence - REXML
:: StreamListener # instruction(name , instruction) -> () - RubyVM
:: InstructionSequence . load _ from _ binary _ extra _ data(binary) -> String
-
Fiddle
:: Importer # struct(signature) -> Class (27325.0) -
C の構造体型に対応する Ruby のクラスを構築して返します。
...きます。そしてそれを
配列で signature に渡してデータを定義します。例えば C における
struct timeval {
long tv_sec;
long tv_usec;
};
という構造体型に対応して
Timeval = struct(["long tv_sec", "long tv_usec"])
として構造体に対応する......* initialize
* to_ptr
* to_i
* 構造体の各メンバへのアクセサ
返されるクラスは Fiddle::CStruct を継承しています。詳しくは
そちらを参照してください。
@param signature 構造体の各要素を文字列で表現したものの配列
require 'fid......dle/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... -
VALUE rb
_ time _ timespec _ new(const struct timespec *ts , int offset) (24700.0) -
引数 ts、offset を元に Time オブジェクトを作成して返します。
...引数 ts、offset を元に Time オブジェクトを作成して返します。
@param ts timespec 構造体のポインタ
@param offset 協定世界時との時差(秒)。
-86400 < offset < 86400 の場合は指定した時差に、INT_MAX
を指定した場合は......地方時、INT_MAX-1 を指定した場合は UTC に
なります。
@raise ArgumentError offset に上述の範囲以外の値を指定した場合に発生し
ます。... -
TracePoint
# instruction _ sequence -> RubyVM :: InstructionSequence (24600.0) -
script_compiledイベント発生時にコンパイルされた RubyVM::InstructionSequenceインスタンスを返します。
...script_compiledイベント発生時にコンパイルされた
RubyVM::InstructionSequenceインスタンスを返します。
//emlist[例][ruby]{
TracePoint.new(:script_compiled) do |tp|
p tp.instruction_sequence # => <RubyVM::InstructionSequence:block in <main>@(eval):1>
end.enable do
eval......("puts 'hello'")
end
//}
@raise RuntimeError :script_compiled イベントのための
イベントフックの外側で実行した場合に発生します。... -
REXML
:: StreamListener # instruction(name , instruction) -> () (21600.0) -
XML処理命令(PI)をパースしたときに呼び出されるコールバックメソッドです。
...(PI)をパースしたときに呼び出されるコールバックメソッドです。
@param name ターゲット名が文字列で渡されます
@param instruction 処理命令の内容が文字列で渡されます
=== 例
<?xml-stylesheet type="text/css" href="style.css"?>
というPIに......対し
name: "xml-stylesheet"
instruction: " type=\"text/css\" href=\"style.css\""
という引数が渡されます。... -
RubyVM
:: InstructionSequence . load _ from _ binary _ extra _ data(binary) -> String (21500.0) -
バイナリフォーマットの文字列から埋め込まれたextra_dataを取り出します。
...埋め込まれたextra_dataを取り出します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
binary = iseq.to_binary("extra_data")
RubyVM::InstructionSequence.load_from_binary_extra_data(binary) # => extra_data
//}
@see RubyVM::InstructionSequence#to_binary... -
REXML
:: SAX2Listener # processing _ instruction(target , data) -> () (21400.0) -
XML 処理命令(PI)に対し呼び出されるコールバックメソッドです。
...XML 処理命令(PI)に対し呼び出されるコールバックメソッドです。
@param target ターゲット名が文字列で渡されます
@param data 処理命令の内容が文字列で渡されます... -
Struct
# inspect -> String (21330.0) -
self の内容を人間に読みやすい文字列にして返します。
...述は Struct の下位クラスのインスタンスに対して呼び
出す事を想定しています。Struct.new は Struct の下位クラスを作成する点に
注意してください。
//emlist[例][ruby]{
Customer = Struct.new(:name, :address, :zip)
joe = Customer.new("Joe Smith", "12......3 Maple, Anytown NC", 12345)
joe.inspect # => "#<struct Customer name=\"Joe Smith\", address=\"123 Maple, Anytown NC\", zip=12345>"
//}... -
Struct
. keyword _ init? -> bool | nil (21234.0) -
(このメソッドは Struct の下位クラスにのみ定義されています) 構造体が作成されたときに keyword_init: true を指定されていたら true を返します。 false を指定されていたら false を返します。 それ以外の場合は nil を返します。
...ドは Struct の下位クラスにのみ定義されています)
構造体が作成されたときに keyword_init: true を指定されていたら true を返します。
false を指定されていたら false を返します。
それ以外の場合は nil を返します。
//emlist[例][rub......y]{
Foo = Struct.new(:a)
Foo.keyword_init? # => nil
Bar = Struct.new(:a, keyword_init: true)
Bar.keyword_init? # => true
Baz = Struct.new(:a, keyword_init: false)
Baz.keyword_init? # => false
//}... -
Struct
# filter -> Enumerator (21226.0) -
構造体のメンバの値に対してブロックを評価した値が真であった要素を全て含 む配列を返します。真になる要素がひとつもなかった場合は空の配列を返しま す。
...ックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
Lots = Struct.new(:a, :b, :c, :d, :e, :f)
l = Lots.new(11, 22, 33, 44, 55, 66)
l.select {|v| (v % 2).zero? } #=> [22, 44, 66]
//}
[注意] 本メソッドの記述は Struct の下位クラスのインスタンス......に対して呼び
出す事を想定しています。Struct.new は Struct の下位クラスを作成する点に
注意してください。
@see Enumerable#select... -
Struct
# filter {|i| . . . } -> [object] (21226.0) -
構造体のメンバの値に対してブロックを評価した値が真であった要素を全て含 む配列を返します。真になる要素がひとつもなかった場合は空の配列を返しま す。
...ックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
Lots = Struct.new(:a, :b, :c, :d, :e, :f)
l = Lots.new(11, 22, 33, 44, 55, 66)
l.select {|v| (v % 2).zero? } #=> [22, 44, 66]
//}
[注意] 本メソッドの記述は Struct の下位クラスのインスタンス......に対して呼び
出す事を想定しています。Struct.new は Struct の下位クラスを作成する点に
注意してください。
@see Enumerable#select... -
st
_ table * st _ init _ table _ with _ size(struct st _ hash _ type *type , int size) (18716.0) -
st_table を作成する。_with_size はサイズを指定して生成する。 struct st_hash_type はハッシュ値を得る関数と、同値判定を行う 関数を持つ。
...st_table を作成する。_with_size はサイズを指定して生成する。
struct st_hash_type はハッシュ値を得る関数と、同値判定を行う
関数を持つ。... -
st
_ table * st _ init _ table(struct st _ hash _ type *type) (18600.0) -