225件ヒット
[1-100件を表示]
(0.126秒)
種類
- 文書 (92)
- インスタンスメソッド (77)
- クラス (23)
- ライブラリ (22)
- 特異メソッド (11)
ライブラリ
- ビルトイン (64)
- logger (1)
-
rdoc
/ generator / darkfish (11) -
rdoc
/ generator / ri (11) -
rubygems
/ specification (22) - thread (2)
クラス
-
Gem
:: Specification (22) -
RDoc
:: Generator :: Darkfish (11) -
RDoc
:: Generator :: RI (11) -
Thread
:: Backtrace :: Location (44)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - Application (1)
- ConditionVariable (11)
- Location (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 3
. 0 . 0 (4) -
absolute
_ path (11) -
base
_ label (11) -
cgi
/ session (11) -
from
_ yaml (11) - inspect (11)
-
irb
/ completion (11) -
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 8 . 3 feature (11) -
ruby 1
. 8 . 4 feature (11) -
ruby 1
. 9 feature (11) -
to
_ s (11) -
yaml
_ initialize (11) - セキュリティモデル (11)
検索結果
先頭5件
-
RDoc
:: Generator :: Darkfish # initialize(store , options) -> RDoc :: Generator :: Darkfish (24301.0) -
RDoc::Generator::Darkfish オブジェクトを初期化します。
...RDoc::Generator::Darkfish オブジェクトを初期化します。
@param store RDoc::Store オブジェクトを指定します。
@param options RDoc::Options オブジェクトを指定します。... -
RDoc
:: Generator :: RI # initialize(store , options) -> RDoc :: Generator :: RI (24301.0) -
RDoc::Generator::RI オブジェクトを初期化します。
...RDoc::Generator::RI オブジェクトを初期化します。
@param store RDoc::Store オブジェクトを指定します。
@param options RDoc::Options オブジェクトを指定します。... -
Gem
:: Specification # yaml _ initialize (15201.0) -
@todo
@todo -
Thread
:: Backtrace :: Location (12012.0) -
Ruby のフレームを表すクラスです。
...tions から生成されます。
//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......ions.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_s
end
//}
例2の実行結果:
init.rb:4:in `initialize'
init.rb:8:in `new'
ini......t.rb:8:in `<main>'
=== 参考
* Ruby VM アドベントカレンダー #4 vm_backtrace.c: https://www.atdot.net/~ko1/diary/201212.html#d4... -
Logger
:: Application (12006.0) -
ユーザ定義のアプリケーションにログ機能を簡単に追加することができます。
...ソッドを呼び出します。
例:
class FooApp < Application
def initialize(foo_app, application_specific, arguments)
super('FooApp') # Name of the application.
end
def run
...
log(WARN, 'warning', 'my_method1')
...
@log.error('my_method2') { 'E......rror!' }
...
end
end
status = FooApp.new(....).start
=== 注意
このクラスは 2.2.0 で gem ライブラリとして切り離されました。2.2.0
以降ではそちらを利用してください。
* https://rubygems.org/gems/logger-application... -
Thread
:: ConditionVariable (12006.0) -
スレッドの同期機構の一つである状態変数を実現するクラスです。
...一つである状態変数を実現するクラスです。
以下も ConditionVariable を理解するのに参考になります。
https://ruby-doc.com/docs/ProgrammingRuby/html/tut_threads.html#UF
=== Condition Variable とは
あるスレッド A が排他領域で動いていたとしま......状況を解決するのが Condition Variable です。
スレッド a で条件(リソースが空いているかなど)が満たされるまで wait メソッドで
スレッドを止めます。他のスレッド b において条件が満たされたなら signal
メソッドでスレッド a......作
cv.signal
}
}
以下は 14445 で紹介されている例です。@q が空になった場合、
あるいは満タンになった場合に Condition Variable を使って wait しています。
require 'thread'
class TinyQueue
def initialize(max=2)
@max =... -
cgi
/ session (12006.0) -
CGI のセッション管理を行うライブラリ。
...CGI のセッション管理を行うライブラリ。
セッションとは、HTTP の一連のリクエストとレスポンスが属するべき
コンテクスト (状況) のことをいいます。
セッション管理には従来通り cgi ライブラリが提供する
クッキーを使......i/session を使用した方がよりわかりやすいでしょう。
セッション情報は Hash ライクなインターフェースです。
セッションはセッション ID とプログラムが記録した
セッション情報から構成されます。
デフォルトでは CGI::Sessi......るとあいさつをするだけのつまらない CGI スクリプト。
ソースコード
#!/usr/bin/ruby
require 'kconv'
require 'cgi'
require 'cgi/session'
class SessionDemo
def initialize
@cgi = CGI.new
File.umask(0077) # セッシ... -
irb
/ completion (12006.0) -
irb の completion 機能を提供するライブラリです。
...irb の completion 機能を提供するライブラリです。
=== 使い方
$ irb -r irb/completion
とするか, ~/.irbrc 中に
require "irb/completion"
を入れてください.
irb実行中に require "irb/completion" してもよいです.
irb 実行中に [Tab] を押すとコ......全に補完します.
irb(main):001:0> in
in inspect instance_eval
include install_alias_method instance_of?
initialize install_aliases instance_variables
irb(main):001:0> inspect
"main"
irb(main):002:0> foo = Objec......覧がでます.
irb(main):003:0> foo.
foo.== foo.frozen? foo.protected_methods
foo.=== foo.hash foo.public_methods
foo.=~ foo.id foo.respond_to?
foo.__id__ foo.inspect f... -
Thread
:: Backtrace :: Location # inspect -> String (9212.0) -
Thread::Backtrace::Location#to_s の結果を人間が読みやすいような文 字列に変換したオブジェクトを返します。
...race::Location#to_s の結果を人間が読みやすいような文
字列に変換したオブジェクトを返します。
//emlist[例][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.inspect
end
# => "path/to/foo.rb:5:in `initialize'"
# "path/to/foo.rb:9:in `new'"
# "path/to/foo.rb:9:in `<main>'"
//}... -
Gem
:: Specification . from _ yaml(input) -> Gem :: Specification (6212.0) -
YAML ファイルから gemspec をロードします。
...Gem::Specification をロードすると、通常の Ruby オブジェクトの
初期化ルーチン (#initialize) を通りません。このメソッドは初期化ルーチンの一部を実行し、
gemspec のバージョンチェックも行います。
@param input 文字列か IO オブ...