57件ヒット
[1-57件を表示]
(0.054秒)
種類
- 文書 (42)
- インスタンスメソッド (11)
- 特異メソッド (4)
クラス
- Data (4)
-
WIN32OLE
_ TYPE (11)
キーワード
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 3 . 0 (9) -
default
_ event _ sources (11) -
ruby 1
. 6 feature (11)
検索結果
先頭5件
-
NEWS for Ruby 2
. 0 . 0 (26096.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 2.0.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......います
* 追加(実験的): Module#refine, スコープを限定してクラスやモジュールを拡張します。
* 拡張: Module#define_method は UnboundMethod を受け付けるようになりました
* 拡張: Module#const_get 修飾された定数名の文字列を受け......更:
* Time#to_s now returns US-ASCII encoding instead of BINARY.
* TracePoint
* new class. This class is replacement of set_trace_func.
Easy to use and efficient implementation.
* toplevel
* added method:
* added main.define_method which defines a global function.... -
NEWS for Ruby 2
. 1 . 0 (26042.0) -
NEWS for Ruby 2.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 2.1.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......します。
* Binding
* 追加: Binding#local_variable_get
* 追加: Binding#local_variable_set
* 追加: Binding#local_variable_defined?
* Enumerable
* 追加: Enumerable#to_h キーと値のペアのリストをハッシュに変換します。
* Exception
* 追加: E......* 特異クラスの祖先はそれ自身を含みます。
The ancestors of a singleton class now include singleton classes,
in particular itself.
* Module#define_method Object#define_singleton_method
* 定義したメソッドの名前をシンボルで返すようになりま... -
NEWS for Ruby 2
. 3 . 0 (26036.0) -
NEWS for Ruby 2.3.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 2.3.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......たときに、自動的に他の似た名前を提案してくれます。
//emlist{
"Yuki".starts_with?("Y")
# => NoMethodError: undefined method `starts_with?' for "Yuki":String
# Did you mean? start_with?
//}
* インデントされたヒアドキュメント:
* 新......時を timespec 構造体として取得する rb_timespec_now() が追加されました。
11558
* 起算時からの経過秒数、ナノ秒、UTCからの時差から Time オブジェクトを
生成する rb_time_timespec_new() が追加されました。
11558
* rb_autoload(... -
ruby 1
. 6 feature (23300.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...00019>))
: 2002-09-11: Queue#((<Queue/pop>))
Queue#pop に競合状態の問題がありました ((<ruby-dev:17223>))
: 2002-09-11: SizedQueue.new
引数に 0 以下を受けつけるバグが修正されました。
: 2002-09-05: ((<リテラル/式展開>))
stable snapshot で、一......((<ruby-bugs-ja:PR#216>))
Object.new.instance_eval {
p remove_instance_variable :@foo
}
=> ruby 1.6.7 (2002-03-01) [i586-linux]
nil
=> -:2:in `remove_instance_variable': instance variable @foo not defined (NameError)
ruby 1.6.7 (2002-......として英数字を指定
できなくなりました。
p %q1..1
=> ruby 1.6.5 (2001-10-10) [i586-linux]
".."
=> -:1: unknown type of %string
p %q1..1
^
ruby 1.6.5 (2001-10-15) [i586-linux]
: String#=~
String#=~ の呼出で両辺と... -
Data
. define(*args) -> Class (18198.0) -
Data クラスに新しいサブクラスを作って、それを返します。
...。
//emlist[例][ruby]{
Dog = Data.define(:name, :age)
fred = Dog.new("Fred", 5)
p fred.name # => "Fred"
p fred.age # => 5
//}
メンバの値を書き換えることはできません。
//emlist[例][ruby]{
Dog = Data.define(:name, :age)
fred = Dog.new("Fred", 5)
fred.age = 6 # => NoMethodErr......r
Response = Data.define(:body)
NotFound = Data.define
def get(url)
# ダミーの実装
if url == "http://example.com/"
Response.new(body: "Current time is #{Time.now}")
else
NotFound.new
end
end
end
def fetch(url)
fetcher = HTTPFetcher.new
case fetcher.get......指定した場合
Data.define にブロックを指定した場合は定義した Data をコンテキストにブロックを評価します。
また、定義した Data はブロックパラメータにも渡されます。
//emlist[例][ruby]{
Customer = Data.define(:name, :address) do
def... -
Data
. define(*args) {|subclass| block } -> Class (18198.0) -
Data クラスに新しいサブクラスを作って、それを返します。
...。
//emlist[例][ruby]{
Dog = Data.define(:name, :age)
fred = Dog.new("Fred", 5)
p fred.name # => "Fred"
p fred.age # => 5
//}
メンバの値を書き換えることはできません。
//emlist[例][ruby]{
Dog = Data.define(:name, :age)
fred = Dog.new("Fred", 5)
fred.age = 6 # => NoMethodErr......r
Response = Data.define(:body)
NotFound = Data.define
def get(url)
# ダミーの実装
if url == "http://example.com/"
Response.new(body: "Current time is #{Time.now}")
else
NotFound.new
end
end
end
def fetch(url)
fetcher = HTTPFetcher.new
case fetcher.get......指定した場合
Data.define にブロックを指定した場合は定義した Data をコンテキストにブロックを評価します。
また、定義した Data はブロックパラメータにも渡されます。
//emlist[例][ruby]{
Customer = Data.define(:name, :address) do
def... -
WIN32OLE
_ TYPE # default _ event _ sources -> [WIN32OLE _ TYPE] (60.0) -
型が持つソースインターフェイスを取得します。
...たない場合は空配列を返します。
tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Worksheet')
tobj.default_event_sources.map {|intf| intf.name} #=> ["DocEvents"]
WIN32OLE_EVENT.newでインターフェイス名を指定しない場合は、ここで
返さ......PE.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 do |m|
WebEvent.module_eval do
define_me......ージが表示されました"
@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-lang.org/'
loop do
break if evt.handler.completed...