84件ヒット
[1-84件を表示]
(0.051秒)
別のキーワード
種類
- インスタンスメソッド (60)
- 文書 (24)
クラス
- Module (48)
-
WIN32OLE
_ TYPE (12)
キーワード
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 1 . 0 (12) -
class
_ exec (12) -
default
_ event _ sources (12) -
module
_ exec (12)
検索結果
先頭5件
-
Module
# define _ method(name , method) -> Symbol (30586.0) -
インスタンスメソッド name を定義します。
...レシーバクラスのインスタンスの上で BasicObject#instance_eval されます。
@param name メソッド名を String または Symbol を指定します。
@param method Proc、Method あるいは UnboundMethod の
いずれかのインスタンスを指定します。
@retu......。
@raise TypeError method に同じクラス、サブクラス、モジュール以外のメソッ
ドを指定した場合に発生します。
//emlist[例][ruby]{
class Foo
def foo() p :foo end
define_method(:bar, instance_method(:foo))
end
Foo.new.bar # => :foo
//}... -
Module
# define _ method(name) { . . . } -> Symbol (30386.0) -
インスタンスメソッド name を定義します。
...レシーバクラスのインスタンスの上で BasicObject#instance_eval されます。
@param name メソッド名を String または Symbol を指定します。
@param method Proc、Method あるいは UnboundMethod の
いずれかのインスタンスを指定します。
@retu......。
@raise TypeError method に同じクラス、サブクラス、モジュール以外のメソッ
ドを指定した場合に発生します。
//emlist[例][ruby]{
class Foo
def foo() p :foo end
define_method(:bar, instance_method(:foo))
end
Foo.new.bar # => :foo
//}... -
NEWS for Ruby 2
. 1 . 0 (3303.0) -
NEWS for Ruby 2.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 2.1.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......めにキーワード引数 `exception: false` を受け付けるようになりました
* Kernel
* 追加: Kernel#singleton_method(Object#singleton_method)
* Module
* 追加: Module#using, which activates refinements of the specified module only
in the current class or module d......れば Q! と q! は long long 型を表します
* toplevel
* main.using はもはや実験的な機能ではありません。
The method activates refinements in the ancestors of the argument module to
support refinement inheritance by Module#include
=== 組み込みクラス... -
NEWS for Ruby 2
. 0 . 0 (3153.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 2.0.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......* 追加(実験的): Module#refine, スコープを限定してクラスやモジュールを拡張します。
* 拡張: Module#define_method は UnboundMethod を受け付けるようになりました
* 拡張: Module#const_get 修飾された定数名の文字列を受け付けるよ......索
* RubyVM (MRI specific)
* 追加: RubyVM::InstructionSequence.of to get the instruction sequence
from a method or a block.
* 追加: RubyVM::InstructionSequence#path,
RubyVM::InstructionSequence#absolute_path,
RubyVM::InstructionSequence#label,
RubyVM::Instruct... -
WIN32OLE
_ TYPE # default _ event _ sources -> [WIN32OLE _ TYPE] (72.0) -
型が持つソースインターフェイスを取得します。
...ources[0]
class WebEvent
def initialize
@completed = false
end
attr_reader :completed
end
source.ole_methods.each do |m|
WebEvent.module_eval do
define_method("on#{m.name}") do |*arg|
if arg[0] == "ページが表示されました"
@completed = true
e......now}: #{m.name} was called"
p arg
end
end
end
evt = WIN32OLE_EVENT.new(ctl)
evt.handler = WebEvent.new
ctl.navigate2 'http://www.ruby-lang.org/'
loop do
break if evt.handler.completed
WIN32OLE_EVENT.message_loop
end
ctl.Quit
このプログラムを実行するとWindows......s called
[#<WIN32OLE:0x438a2f8>, "http://www.ruby-lang.org/ja/"]
2010-10-06 22:33:54 +0900: StatusTextChange was called
["ページが表示されました"]
@see WIN32OLE_TYPE.new, WIN32OLE_TYPE#progid,
WIN32OLE_TYPE#ole_methods, WIN32OLE_METHOD#name,
WIN32OLE_EVENT.new, WIN32OLE_EVEN... -
Module
# class _ exec(*args) {|*vars| . . . } -> object (36.0) -
与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。
...になります。
@param args ブロックに渡す引数を指定します。
//emlist[例][ruby]{
class Thing
end
c = 1
Thing.class_exec{
def hello()
"Hello there!"
end
define_method(:foo) do # ローカル変数がブロックの外側を参照している
c
end
}
t = T......hing.new
p t.hello() #=> "Hello there!"
p t.foo() #=> 1
//}
@see Module#module_eval, Module#class_eval... -
Module
# module _ exec(*args) {|*vars| . . . } -> object (36.0) -
与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。
...になります。
@param args ブロックに渡す引数を指定します。
//emlist[例][ruby]{
class Thing
end
c = 1
Thing.class_exec{
def hello()
"Hello there!"
end
define_method(:foo) do # ローカル変数がブロックの外側を参照している
c
end
}
t = T......hing.new
p t.hello() #=> "Hello there!"
p t.foo() #=> 1
//}
@see Module#module_eval, Module#class_eval...