るりまサーチ

最速Rubyリファレンスマニュアル検索!
36件ヒット [1-36件を表示] (0.090秒)

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

キーワード

検索結果

Thread::Backtrace::Location#inspect -> String (21126.0)

Thread::Backtrace::Location#to_s の結果を人間が読みやすいような文 字列に変換したオブジェクトを返します。

...ace::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>'"
//}...

Module#const_missing(name) (6157.0)

定義されていない定数を参照したときに Ruby インタプリタが このメソッドを呼びます。

... Ruby インタプリタが
このメソッドを呼びます。

@param name 参照した定数名の Symbol

@raise NameError このメソッドを呼び出した場合、デフォルトで発生する例外


//emlist[例][ruby]{
class
Foo
def Foo.const_missing(id)
warn "undefined consta...
...nt #{id.inspect}"
end

Bar
end
Foo::Bar

# => undefined constant :Bar
# undefined constant :Bar
//}...

WIN32OLE_EVENT#handler=(obj) -> () (43.0)

イベント処理を実行するオブジェクトを登録します。

...ジェクトをイベントハンドラとし
て登録します。

イベントハンドラはイベント名に「on」を前置します。もし、イベントに対応
するonメソッドが実装されていなければmethod_missingが呼ばれます。イベン
ト名は大文字小文字...
...オブジェクト。イベント受信を
解除するにはnilを指定します。

class
IeHandler
def initialize
@completed = false
end
attr_reader :completed
def onDocumentComplete(disp, uri)
disp.document.getElementsByTagName('a').each do |e|
p...
...d, *args)
puts "event=#{id.to_s}, args=#{args.inspect}"
end
end

ie = WIN32OLE.new('InternetExplorer.Application.1')
event = WIN32OLE_EVENT.new(ie, 'DWebBrowserEvents2')
event.handler = IeHandler.new
ie.Navigate2 'http://www.ruby-lang.org/ja/'
loop do
break if event.handler...