るりまサーチ

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

別のキーワード

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

検索結果

<< < 1 2 3 >>

Forwardable#def_delegator(accessor, method, ali = method) -> () (229.0)

メソッドの委譲先を設定します。

...

@param accessor 委譲先のオブジェクト

@param method 委譲先のメソッド

@param ali 委譲元のメソッド

委譲元のオブジェクトで ali が呼び出された場合に、
委譲先のオブジェクトの method へ処理が委譲されるようになります。

...
...ります。

//emlist[例][ruby]{
require
'forwardable'

class MyQueue
extend Forwardable
attr_reader :queue
def initialize
@queue = []
end

def_delegator :@queue, :push, :mypush
end

q = MyQueue.new
q.mypush 42
q.queue # => [42]
q.push 23 # => NoMethodError
//}

@see Forwardable#...

Forwardable#def_instance_delegator(accessor, method, ali = method) -> () (229.0)

メソッドの委譲先を設定します。

...

@param accessor 委譲先のオブジェクト

@param method 委譲先のメソッド

@param ali 委譲元のメソッド

委譲元のオブジェクトで ali が呼び出された場合に、
委譲先のオブジェクトの method へ処理が委譲されるようになります。

...
...ります。

//emlist[例][ruby]{
require
'forwardable'

class MyQueue
extend Forwardable
attr_reader :queue
def initialize
@queue = []
end

def_delegator :@queue, :push, :mypush
end

q = MyQueue.new
q.mypush 42
q.queue # => [42]
q.push 23 # => NoMethodError
//}

@see Forwardable#...

ERB#def_class(superklass=Object, methodname=&#39;erb&#39;) -> Class (129.0)

変換した Ruby スクリプトをメソッドとして定義した無名のクラスを返します。

...変換した Ruby スクリプトをメソッドとして定義した無名のクラスを返します。


@param superklass 無名クラスのスーパークラス

@param methodname メソッド名

//emlist[例][ruby]{
require
'erb'

class MyClass_
def initialize(arg1, arg2)
@arg1 = arg1...

ERB#def_module(methodname=&#39;erb&#39;) -> Module (129.0)

変換した Ruby スクリプトをメソッドとして定義した無名のモジュールを返します。

...変換した Ruby スクリプトをメソッドとして定義した無名のモジュールを返します。

@param methodname メソッド名

//emlist[例][ruby]{
require
'erb'
filename = 'example.rhtml'
erb = ERB.new("test1<%= arg1 %>\ntest2<%= arg2 %>\n")
erb.filename = filename
MyModule =...

WIN32OLE_TYPE#default_event_sources -> [WIN32OLE_TYPE] (55.0)

型が持つソースインターフェイスを取得します。

...: cp932
require
'win32ole'

type = WIN32OLE_TYPE.new('Microsoft Internet Controls', 'InternetExplorer')
ctl = WIN32OLE.new(type.progid)
source = type.default_event_sources[0]
class WebEvent
def initialize
@completed = false
end
attr_reader :completed
end
source.ole_methods.each...
..._method("on#{m.name}") do |*arg|
if arg[0] == "ページが表示されました"
@completed = true
end
puts "#{Time.now}: #{m.name} was called"
p arg
end
end
end
evt = WIN32OLE_EVENT.new(ctl)
evt.handler = WebEvent.new
ctl.navigate2 'http://www.ruby-...
...e was called
["{265b75c1-4158-11d0-90f6-00c04fd497ea}"]
2010-10-06 22:33:54 +0900: BeforeNavigate2 was called
[#<WIN32OLE:0x9d08f0>, "http://www.ruby-lang.org/", 0, "", nil, "", false]
2010-10-06 22:33:54 +0900: DownloadBegin was called
[]
2010-10-06 22:33:54 +0900: PropertyChange was called...

絞り込み条件を変える

<< < 1 2 3 >>