25件ヒット
[1-25件を表示]
(0.125秒)
別のキーワード
クラス
- Module (12)
-
Rake
:: InvocationChain (12) - String (1)
キーワード
-
append
_ as _ bytes (1) -
append
_ features (12)
検索結果
先頭3件
-
Rake
:: InvocationChain # append(task _ name) -> Rake :: InvocationChain (27320.0) -
与えられたタスク名を追加して新しい Rake::InvocationChain を返します。
...InvocationChain を返します。
@param task_name 追加するタスク名を指定します。
@raise RuntimeError 循環したタスクの呼び出しを検出した場合に発生します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :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...