るりまサーチ

最速Rubyリファレンスマニュアル検索!
240件ヒット [1-100件を表示] (0.143秒)

別のキーワード

  1. openssl g
  2. openssl g=
  3. dh g
  4. dsa g
  5. dsa g=

検索結果

<< 1 2 3 > >>

Rake::GemPackageTask#define (24102.0)

タスクを定義します。

...タスクを定義します。

G
emPackageTask.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"

g
uy = "Bob"
g
uy.define_singleton_method(:hello) { "#{self}: Hello there!" }
g
uy.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"

g
uy = "Bob"
g
uy.define_singleton_method(:hello) { "#{self}: Hello there!" }
g
uy.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...
<< 1 2 3 > >>