るりまサーチ

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

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

クラス

キーワード

検索結果

Rake::InvocationChain#append(task_name) -> Rake::InvocationChain (27320.0)

与えられたタスク名を追加して新しい Rake::InvocationChain を返します。

...InvocationChain を返します。

@param task_name 追加するタスク名を指定します。

@raise RuntimeError 循環したタスクの呼び出しを検出した場合に発生します。

//emlist[][ruby]{
# Rakefile での記載例とする

t
ask default: :test_rake_app
t
ask :test_rake_...
...app do
invocation_chain= Rake::InvocationChain.new("task_a", Rake::InvocationChain::EMPTY)
invocation_chain.append("task_b") # => LL("task_b", "task_a")
end

//}...

String#append_as_bytes(*objects) -> self (18350.0)

引数で与えたオブジェクトをバイト列として、self に破壊的に連結します。

...st[例][ruby]{
s = "あ".b # => "\xE3\x81\x82"
s.encoding # => #<Encoding:BINARY (ASCII-8BIT)>
s.append_as_bytes("い") # => "\xE3\x81\x82\xE3\x81\x84"

# s << "い" では連結できない
s << "い" # => "incompatible character encodings: BINARY (ASCII-8BIT) and UT...
...F-8 (Encoding::CompatibilityError)
//}

//emlist[引数で整数を渡す例][ruby]{
t
= ""
t
.append_as_bytes(0x61) # => "a"
t
.append_as_bytes(0x3062) # => "ab"
//}

@see String#<<, String#concat...

Module#append_features(module_or_class) -> self (18344.0)

モジュール(あるいはクラス)に self の機能を追加します。

... Ruby で書くと以下のように定義できます。

//emlist[例][ruby]{
def include(*modules)
modules.reverse_each do |mod|
# append_features や included はプライベートメソッドなので
# 直接 mod.append_features(self) などとは書けない
mod.__send__(:append...
..._features, self)
mod.__send__(:included, self)
end

end

//}

@see Module#included...