240件ヒット
[1-100件を表示]
(0.143秒)
別のキーワード
ライブラリ
- ビルトイン (144)
- mkmf (12)
- rake (36)
-
rake
/ gempackagetask (12) -
rake
/ packagetask (12) -
win32
/ registry (24)
クラス
- BasicObject (12)
- Binding (12)
- Data (12)
-
Encoding
:: UndefinedConversionError (60) - Module (24)
- Object (24)
-
Rake
:: GemPackageTask (12) -
Rake
:: PackageTask (12) -
Win32
:: Registry :: PredefinedKey (24)
モジュール
- Kernel (36)
-
Rake
:: TaskManager (12)
キーワード
- class (12)
-
class
_ exec (12) - close (12)
-
create
_ header (12) -
define
_ singleton _ method (24) -
define
_ task (12) -
destination
_ encoding (12) -
destination
_ encoding _ name (12) -
error
_ char (12) - file (12)
- hash (3)
- inspect (3)
-
local
_ variable _ defined? (12) -
module
_ exec (12) -
singleton
_ method _ undefined (12) -
source
_ encoding (12) -
source
_ encoding _ name (12) - task (12)
-
to
_ s (3) - with (3)
検索結果
先頭5件
-
Rake
:: GemPackageTask # define (24102.0) -
タスクを定義します。
...タスクを定義します。
GemPackageTask.new にブロックが与えられている場合に、自動的に呼び出されます。... -
Rake
:: PackageTask # define -> self (21102.0) -
タスクを定義します。
タスクを定義します。
@raise RuntimeError バージョン情報をセットしていない場合に発生します。
初期化時に :noversion が指定されている場合は発生しません。 -
Object
# define _ singleton _ method(symbol) { . . . } -> Symbol (12215.0) -
self に特異メソッド name を定義します。
...self に特異メソッド name を定義します。
@param symbol メソッド名を String または Symbol で指定します。
@param method Proc、Method あるいは UnboundMethod の
いずれかのインスタンスを指定します。
@return メソッド名を表す Sy......t[][ruby]{
class A
class << self
def class_name
to_s
end
end
end
A.define_singleton_method(:who_am_i) do
"I am: #{class_name}"
end
A.who_am_i # ==> "I am: A"
guy = "Bob"
guy.define_singleton_method(:hello) { "#{self}: Hello there!" }
guy.hello #=> "Bob: Hello there!"
//}... -
Object
# define _ singleton _ method(symbol , method) -> Symbol (12215.0) -
self に特異メソッド name を定義します。
...self に特異メソッド name を定義します。
@param symbol メソッド名を String または Symbol で指定します。
@param method Proc、Method あるいは UnboundMethod の
いずれかのインスタンスを指定します。
@return メソッド名を表す Sy......t[][ruby]{
class A
class << self
def class_name
to_s
end
end
end
A.define_singleton_method(:who_am_i) do
"I am: #{class_name}"
end
A.who_am_i # ==> "I am: A"
guy = "Bob"
guy.define_singleton_method(:hello) { "#{self}: Hello there!" }
guy.hello #=> "Bob: Hello there!"
//}... -
BasicObject
# singleton _ method _ undefined(name) -> object (12201.0) -
特異メソッドが Module#undef_method または undef により未定義にされた時にインタプリタから呼び出されます。
...るフックには
Module#method_undefined を使います。
@param name 未定義にされたメソッド名が Symbol で渡されます。
//emlist[例][ruby]{
class Foo
def singleton_method_undefined(name)
puts "singleton method \"#{name}\" was undefined"
end
end
obj = Foo.new
def ob......foo
end
def obj.bar
end
class << obj
undef_method :foo
end
obj.instance_eval {undef bar}
#=> singleton method "foo" was undefined
# singleton method "bar" was undefined
//}
@see Module#method_undefined,BasicObject#singleton_method_added,BasicObject#singleton_method_removed , d:spec/def#undef... -
Rake
:: TaskManager # define _ task(task _ class , *args) { . . . } -> Rake :: Task (9208.0) -
タスクを定義します。
...lass タスククラスを指定します。
@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 -> Encoding (9201.0) -
エラーを発生させた変換の変換先のエンコーディングを Encoding オブジェクトで返します。
...エラーを発生させた変換の変換先のエンコーディングを Encoding
オブジェクトで返します。
@see Encoding::UndefinedConversionError#source_encoding... -
Encoding
:: UndefinedConversionError # source _ encoding -> Encoding (9201.0) -
エラーを発生させた変換の変換元のエンコーディングを Encoding オブジェクトで返します。
...ーディングを Encoding
オブジェクトで返します。
変換が多段階になされる場合は元の文字列のものではない
エンコーディングが返される場合があることに注意してください。
@see Encoding::UndefinedConversionError#destination_encoding... -
Binding
# local _ variable _ defined?(symbol) -> bool (9101.0) -
引数 symbol で指定した名前のローカル変数が定義されている場合に true を、 そうでない場合に false を返します。
...1
binding.local_variable_defined?(:a) # => true
binding.local_variable_defined?(:b) # => false
end
//}
このメソッドは以下のコードの短縮形です。
//emlist[][ruby]{
binding.eval("defined?(#{symbol}) == 'local-variable'")
//}
@see Binding#local_variable_get, Binding#local_var...