るりまサーチ

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

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

キーワード

検索結果

Observable (31.0)

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

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

Mix-in により Observer パターンを提供します。

Observable モジュールを include したクラスは
Observable#changed メソッドにより更新フラグを立て、
Observable#notify_observers が呼び出されると...
...sleep 1
end
end
end

class Price ### A mock class to fetch a stock price (60 - 140).
def self.fetch(symbol)
60 + rand(80)
end
end

class Warner ### An abstract observer of Ticker objects.
def initialize(ticker, limit)
@limit = limit...
...erver(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...

OpenSSL::OCSP (19.0)

OCSP(Online Certificate Status Protocol)を取り扱うための モジュールです。OCSP は 2560 で定義されています。

...req.add_nonce

http = Net::HTTP.new('ocsp.example.com', 80)
httpres = http.post("/", req.to_der, 'content-type' => 'application/ocsp-request')
raise "HTTP error" if !httpres.kind_of?(Net::HTTPOK)
res = OpenSSL::OCSP::Response.new(httpres.body)

puts "Response status: #{res.status_strin...
...g}"
exit if res.status != OpenSSL::OCSP::RESPONSE_STATUS_SUCCESSFUL

basic_resp = res.basic
raise "nonce error" unless [-1, 1].include?(req.check_nonce(basic_resp))
unless basic_resp.verify([], store)
puts "verify response fail"
end
rescid, status, reason, revtime, thisupd, nextupd,...