144件ヒット
[101-144件を表示]
(0.055秒)
別のキーワード
クラス
- BasicObject (12)
- Method (24)
- Object (24)
- String (24)
- UnboundMethod (36)
-
WIN32OLE
_ EVENT (12)
モジュール
キーワード
-
define
_ singleton _ method (24) - handler= (12)
- inspect (24)
-
method
_ missing (12) - owner (12)
-
to
_ json (12) -
to
_ str (12)
検索結果
先頭4件
-
UnboundMethod
# owner -> Class | Module (3131.0) -
このメソッドが定義されている class か module を返します。
...このメソッドが定義されている class か module を返します。
//emlist[例][ruby]{
Integer.instance_method(:to_s).owner # => Integer
Integer.instance_method(:to_c).owner # => Numeric
Integer.instance_method(:hash).owner # => Kernel
//}... -
JSON
:: Generator :: GeneratorMethods :: Object # to _ json(state _ or _ hash = nil) -> String (3129.0) -
自身を to_s で文字列にした結果を JSON 形式の文字列に変換して返します。
...自身を to_s で文字列にした結果を JSON 形式の文字列に変換して返します。
このメソッドはあるオブジェクトに to_json メソッドが定義されていない場合に使用する
フォールバックのためのメソッドです。
@param state_or_hash 生......st[例][ruby]{
require "json"
class Person
attr :name, :age
def initialize(name, age)
@name, @age = name, age
end
end
tanaka = Person.new("tanaka", 29)
tanaka.to_json # => "\"#<Person:0x00007ffdec0167c8>\""
tanaka.method(:to_json).owner # => JSON::Ext::Generator::GeneratorMethods::Obje... -
UnboundMethod
# inspect -> String (3126.0) -
self を読みやすい文字列として返します。
...self を読みやすい文字列として返します。
詳しくは Method#inspect を参照してください。
//emlist[例][ruby]{
String.instance_method(:count).inspect # => "#<UnboundMethod: String#count>"
//}
@see Method#inspect... -
WIN32OLE
_ EVENT # handler=(obj) -> () (131.0) -
イベント処理を実行するオブジェクトを登録します。
...ハンドラはイベント名に「on」を前置します。もし、イベントに対応
するonメソッドが実装されていなければmethod_missingが呼ばれます。イベン
ト名は大文字小文字を区別するため、正確な記述が必要です。
@param obj イベント......e
end
def method_missing(id, *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/'...