ライブラリ
- ビルトイン (16)
- mkmf (3)
- rake (1)
-
rake
/ gempackagetask (1) -
rake
/ packagetask (1) -
rake
/ rdoctask (1) -
rake
/ testtask (1) -
rdoc
/ context (1) -
win32
/ registry (2) - win32ole (1)
クラス
- Binding (1)
-
Encoding
:: UndefinedConversionError (5) - Method (1)
- Module (6)
- Object (1)
- Proc (1)
-
RDoc
:: Context (1) -
Rake
:: GemPackageTask (1) -
Rake
:: PackageTask (1) -
Rake
:: RDocTask (1) -
Rake
:: TestTask (1) - TracePoint (1)
-
WIN32OLE
_ TYPE (1) -
Win32
:: Registry :: PredefinedKey (2)
モジュール
- Kernel (3)
-
Rake
:: TaskManager (1)
キーワード
- class (1)
-
class
_ exec (1) -
class
_ variable _ defined? (1) - close (1)
-
const
_ defined? (1) -
convertible
_ int (2) -
create
_ header (1) -
default
_ event _ sources (1) -
define
_ task (1) -
defined
_ class (1) -
defined
_ in? (1) -
destination
_ encoding (1) -
destination
_ encoding _ name (1) -
error
_ char (1) -
instance
_ variable _ defined? (1) - lambda? (1)
-
local
_ variable _ defined? (1) -
module
_ exec (1) - parameters (1)
-
private
_ method _ defined? (1) -
protected
_ method _ defined? (1) -
source
_ encoding (1) -
source
_ encoding _ name (1)
検索結果
先頭5件
-
Rake
:: GemPackageTask # define (81607.0) -
タスクを定義します。
タスクを定義します。
GemPackageTask.new にブロックが与えられている場合に、自動的に呼び出されます。 -
Rake
:: PackageTask # define -> self (81607.0) -
タスクを定義します。
タスクを定義します。
@raise RuntimeError バージョン情報をセットしていない場合に発生します。
初期化時に :noversion が指定されている場合は発生しません。 -
Rake
:: RDocTask # define -> self (81607.0) -
タスクを定義します。
タスクを定義します。 -
Rake
:: TestTask # define -> self (81607.0) -
タスクを定義します。
タスクを定義します。 -
Module
# protected _ method _ defined?(name) -> bool (64204.0) -
インスタンスメソッド name がモジュールに定義されており、 しかもその可視性が protected であるときに true を返します。 そうでなければ false を返します。
インスタンスメソッド name がモジュールに定義されており、
しかもその可視性が protected であるときに true を返します。
そうでなければ false を返します。
@param name Symbol か String を指定します。
@see Module#method_defined?, Module#public_method_defined?, Module#private_method_defined?
//emlist[例][ruby]{
module A
def method1() end
end
class B
protected
de... -
Binding
# local _ variable _ defined?(symbol) -> bool (54904.0) -
引数 symbol で指定した名前のローカル変数が定義されている場合に true を、 そうでない場合に false を返します。
引数 symbol で指定した名前のローカル変数が定義されている場合に true を、
そうでない場合に false を返します。
@param symbol ローカル変数名を Symbol オブジェクトで指定します。
//emlist[例][ruby]{
def foo
a = 1
binding.local_variable_defined?(:a) # => true
binding.local_variable_defined?(:b) # => false
end
//}
このメソッドは以下のコードの短縮形です。
//emlist[][ruby]{
bindin... -
Encoding
:: UndefinedConversionError # source _ encoding -> Encoding (54904.0) -
エラーを発生させた変換の変換元のエンコーディングを Encoding オブジェクトで返します。
エラーを発生させた変換の変換元のエンコーディングを Encoding
オブジェクトで返します。
変換が多段階になされる場合は元の文字列のものではない
エンコーディングが返される場合があることに注意してください。
@see Encoding::UndefinedConversionError#destination_encoding -
Encoding
:: UndefinedConversionError # source _ encoding _ name -> Encoding (54904.0) -
エラーを発生させた変換の変換元のエンコーディングを文字列で返します。
エラーを発生させた変換の変換元のエンコーディングを文字列で返します。
@see Encoding::UndefinedConversionError#source_encoding -
Module
# class _ variable _ defined?(name) -> bool (54904.0) -
name で与えられた名前のクラス変数がモジュールに存在する場合 true を 返します。
name で与えられた名前のクラス変数がモジュールに存在する場合 true を
返します。
@param name Symbol か String を指定します。
//emlist[例][ruby]{
class Fred
@@foo = 99
end
Fred.class_variable_defined?(:@@foo) #=> true
Fred.class_variable_defined?(:@@bar) #=> false
Fred.class_variable_defined?('@@foo') #=> true
Fred.class_variable... -
Module
# private _ method _ defined?(name) -> bool (54904.0) -
インスタンスメソッド name がモジュールに定義されており、 しかもその可視性が private であるときに true を返します。 そうでなければ false を返します。
インスタンスメソッド name がモジュールに定義されており、
しかもその可視性が private であるときに true を返します。
そうでなければ false を返します。
@param name Symbol か String を指定します。
@see Module#method_defined?, Module#public_method_defined?, Module#protected_method_defined?
//emlist[例][ruby]{
module A
def method1() end
end
class B
private
def ... -
Object
# instance _ variable _ defined?(var) -> bool (54904.0) -
インスタンス変数 var が定義されていたら真を返します。
インスタンス変数 var が定義されていたら真を返します。
@param var インスタンス変数名を文字列か Symbol で指定します。
//emlist[][ruby]{
class Fred
def initialize(p1, p2)
@a, @b = p1, p2
end
end
fred = Fred.new('cat', 99)
p fred.instance_variable_defined?(:@a) #=> true
p fred.instance_variable_defined?("@b") #=> true
p fred.instan... -
Rake
:: TaskManager # define _ task(task _ class , *args) { . . . } -> Rake :: Task (45925.0) -
タスクを定義します。
タスクを定義します。
@param task_class タスククラスを指定します。
@param args タスクに渡すパラメータを指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.application.define_task(Rake::Task, :t) # => <Rake::Task t => []>
end
//} -
Encoding
:: UndefinedConversionError # destination _ encoding _ name -> String (45604.0) -
エラーを発生させた変換の変換先のエンコーディングを文字列で返します。
エラーを発生させた変換の変換先のエンコーディングを文字列で返します。
@see Encoding::UndefinedConversionError#destination_encoding -
RDoc
:: Context # defined _ in?(file) (45604.0) -
Return true if at least part of this thing was defined in file
Return true if at least part of this thing was defined in file -
TracePoint
# defined _ class -> Class | module (45604.0) -
メソッドを定義したクラスかモジュールを返します。
メソッドを定義したクラスかモジュールを返します。
//emlist[例][ruby]{
class C; def foo; end; end
trace = TracePoint.new(:call) do |tp|
p tp.defined_class # => C
end.enable do
C.new.foo
end
//}
メソッドがモジュールで定義されていた場合も(include に関係なく)モジュー
ルを返します。
//emlist[例][ruby]{
module M; def foo; end; end
class C; include M; end;
trac... -
Encoding
:: UndefinedConversionError # destination _ encoding -> Encoding (45304.0) -
エラーを発生させた変換の変換先のエンコーディングを Encoding オブジェクトで返します。
エラーを発生させた変換の変換先のエンコーディングを Encoding
オブジェクトで返します。
@see Encoding::UndefinedConversionError#source_encoding -
Kernel
# create _ header(header = "extconf . h") -> String (36958.0) -
Kernel#have_func, Kernel#have_header などの検査結果を元に、 ヘッダファイルを生成します。
Kernel#have_func, Kernel#have_header などの検査結果を元に、
ヘッダファイルを生成します。
このメソッドは extconf.rb の最後で呼び出すようにしてください。
@param header ヘッダファイルの名前を指定します。
@return ヘッダファイルの名前を返します。
例
# extconf.rb
require 'mkmf'
have_func('realpath')
have_header('sys/utime.h')
create_header
create_makefile('foo')
上の ext... -
Module
# const _ defined?(name , inherit = true) -> bool (36904.0) -
モジュールに name で指定される名前の定数が定義されている時真 を返します。
モジュールに name で指定される名前の定数が定義されている時真
を返します。
スーパークラスや include したモジュールで定義された定数を検索対象
にするかどうかは第二引数で制御することができます。
@param name String, Symbol で指定される定数名。
@param inherit false を指定するとスーパークラスや include したモジュールで
定義された定数は対象にはなりません。
//emlist[例][ruby]{
module Kernel
FOO = 1
end
# Object は include したモジュ... -
WIN32OLE
_ TYPE # default _ event _ sources -> [WIN32OLE _ TYPE] (36694.0) -
型が持つソースインターフェイスを取得します。
型が持つソースインターフェイスを取得します。
default_event_sourcesメソッドは、selfがCoClass(コンポーネントクラス)
の場合、そのクラスがサポートするデフォルトのソースインターフェイス(イ
ベントの通知元となるインターフェイス)を返します。
@return デフォルトのソースインターフェイスをWIN32OLE_TYPEの配列と
して返します。返すのは配列ですが、デフォルトのソースインターフェ
イスは最大でも1インターフェイスです。ソースインターフェイスを持
たない場合は空配列を返します。
tobj = ... -
Encoding
:: UndefinedConversionError # error _ char -> String (36304.0) -
エラーを発生させた1文字を文字列で返します。
エラーを発生させた1文字を文字列で返します。
//emlist[例][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
begin
ec.convert("\u{a0}")
rescue Encoding::UndefinedConversionError
puts $!.error_char.dump #=> "\u{a0}"
end
//} -
Win32
:: Registry :: PredefinedKey # class (36004.0) -
@todo
@todo -
Win32
:: Registry :: PredefinedKey # close (36004.0) -
@todo
@todo -
Proc
# lambda? -> bool (27412.0) -
手続きオブジェクトの引数の取扱が厳密であるならば true を返します。
手続きオブジェクトの引数の取扱が厳密であるならば true を返します。
引数の取扱の厳密さの意味は以下の例を参考にしてください。
//emlist[例][ruby]{
# lambda で生成した Proc オブジェクトでは true
lambda{}.lambda? # => true
# proc で生成した Proc オブジェクトでは false
proc{}.lambda? # => false
# Proc.new で生成した Proc オブジェクトでは false
Proc.new{}.lambda? # => false
# 以下、lambda?が偽である場合
#... -
Method
# parameters -> [object] (27322.0) -
Method オブジェクトの引数の情報を返します。
Method オブジェクトの引数の情報を返します。
Method オブジェクトが引数を取らなければ空の配列を返します。引数を取る場合は、配列の配列を返し、
各配列の要素は引数の種類に応じた以下のような Symbol と、仮引数の名前を表す Symbol の 2 要素です。
組み込みのメソッドでは、仮引数の名前が取れません。
: :req
必須の引数
: :opt
デフォルト値が指定されたオプショナルな引数
: :rest
* で指定された残りすべての引数
: :keyreq
必須のキーワード引数
: :key
デフォルト値が指定されたオプショナルなキーワード引数
: :keyre... -
Kernel
# convertible _ int(type , headers = nil , opts = nil) (18796.0) -
Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG
Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.
If the +type+ is a integer type and _convertible_ type is found,
following macros are p... -
Kernel
# convertible _ int(type , headers = nil , opts = nil) { . . . } (18796.0) -
Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG
Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.
If the +type+ is a integer type and _convertible_ type is found,
following macros are p... -
Module
# module _ exec(*args) {|*vars| . . . } -> object (18622.0) -
与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。
与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。
モジュールのコンテキストで評価するとは、実行中そのモジュールが self になるということです。
つまり、そのモジュールの定義式の中にあるかのように実行されます。
ローカル変数、定数とクラス変数のスコープはブロックの外側のスコープになります。
@param args ブロックに渡す引数を指定します。
//emlist[例][ruby]{
class Thing
end
c = 1
Thing.class_exec{
def hello()
"Hello there!"
... -
Module
# class _ exec(*args) {|*vars| . . . } -> object (9322.0) -
与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。
与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。
モジュールのコンテキストで評価するとは、実行中そのモジュールが self になるということです。
つまり、そのモジュールの定義式の中にあるかのように実行されます。
ローカル変数、定数とクラス変数のスコープはブロックの外側のスコープになります。
@param args ブロックに渡す引数を指定します。
//emlist[例][ruby]{
class Thing
end
c = 1
Thing.class_exec{
def hello()
"Hello there!"
...