るりまサーチ

最速Rubyリファレンスマニュアル検索!
174件ヒット [1-100件を表示] (0.061秒)
トップページ > クエリ:@[x] > 種類:モジュール[x]

ライブラリ

キーワード

検索結果

<< 1 2 > >>

OpenSSL::ASN1 (163.0)

ASN.1(Abstract Syntax Notation One) のデータを取り扱うためのモジュールです。

...::UTF8String:0x000000027cc700 @tag=12, @value="foobar", @tagging=nil, @tag_class=:UNIVERSAL>
OpenSSL::ASN1.decode(y.to_der)
# => #<OpenSSL::ASN1::Sequence:0x000000027c47d0 @tag=16, @value=[#<OpenSSL::ASN1::Boolean:0x000000027c4898 @tag=1, @value=true, @tagging=nil, @tag_class=:UNIVERSAL>, #<Open...
... @tag=2, @value=-12, @tagging=nil, @tag_class=:UNIVERSAL>], @tagging=nil, @tag_class=:UNIVERSAL>
OpenSSL::ASN1.decode(z.to_der)
# => #<OpenSSL::ASN1::ASN1Data:0x000000027bc918 @tag=2, @value=[#<OpenSSL::ASN1::Boolean:0x000000027bc968 @tag=1, @value=false, @tagging=nil, @tag_class=:UNIVERSAL>], @...
...tag_class=:APPLICATION>
OpenSSL::ASN1.decode(u.to_der)
# => #<OpenSSL::ASN1::ASN1Data:0x000000025bef30 @tag=3, @value="\x00", @tag_class=:APPLICATION>
# @valueが "\x00" という文字列になっている

このモジュールは ASN.1 記法による記述を解釈し、利用する機能...

Observable (25.0)

Observer パターンを提供するモジュールです。

...### Periodically fetch a stock price.
include Observable

def initialize(symbol)
@
symbol = symbol
end

def run
last_price = nil
loop do
price = Price.fetch(@symbol)
print "Current price: #{price}\n"
if price != last_price
cha...
...ects.
def initialize(ticker, limit)
@
limit = limit
ticker.add_observer(self)
end
end

class WarnLow < Warner
def update(time, price) # callback for observer
if price < @limit
print "--- #{time.to_s}: Price below #@limit: #{price}\n"
end
end...
...end

class WarnHigh < Warner
def update(time, price) # callback for observer
if price > @limit
print "+++ #{time.to_s}: Price above #@limit: #{price}\n"
end
end
end

ticker = Ticker.new("MSFT")
WarnLow.new(ticker, 80)
WarnHigh.new(ticker, 120)
ticker.ru...

Gem::SSL (17.0)

@todo

...@todo...

RSS::DublinCoreModel (17.0)

@todo

...@todo...

RSS::ImageModelUtils (17.0)

@todo

...@todo...

絞り込み条件を変える

MonitorMixin (13.0)

スレッドの同期機構としてのモニター機能を提供するモジュールです。

...スレッドの同期機構としてのモニター機能を提供するモジュールです。

クラスに Module#include したり、オブジェクトに
Object#extend したりすることでそのクラス/オブジェクトに
モニタ機能を追加します。

=== 例

//emlist[消費...
...//emlist[extend する例][ruby]{
require 'monitor'
buf = []
buf.extend(MonitorMixin)
//}

しかし、MonitorMixin をクラス定義の際に Module#include を使って
利用する場合は、initialize メソッドで super() か super を呼んで、初期化する必要があります。...
...必要があります。

//emlist[include する例][ruby]{
require 'monitor'

class MyObject
include MonitorMixin

def initialize(val)
super()
@
value = val
end

def to_s
synchronize {
@
value.to_s
}
end
end
//}

以下も参考になります。

* 9384
* 9386...

Errno (7.0)

システムコールのエラーに対応する例外を集めたモジュールです。

...システムコールのエラーに対応する例外を集めたモジュールです。

@
see SystemCallError, Errno::EXXX...

Fcntl (7.0)

ファイルディスクリプタを扱う Unix のシステムコール IO#fcntl (つまりfcntl(2)) で使用できる定数を集めたモジュールです。

...ファイルディスクリプタを扱う Unix のシステムコール IO#fcntl
(つまりfcntl(2)) で使用できる定数を集めたモジュールです。

@
see fcntl(2), open(2), IO#fcntl, IO.open...

GC (7.0)

GC は Ruby インタプリタの「ゴミ集め(Garbage Collection)」を制御 するモジュールです。

...放はこの単位で行われる。
この「ページ」はOSのメモリ管理用語であるページとは異なる概念であることに注意。


==== 参考資料

* http://www.atdot.net/~ko1/activities/2014_rubyconf_ph_pub.pdf
* http://tmm1.net/ruby21-rgengc/


@
see ObjectSpace...
<< 1 2 > >>