156件ヒット
[101-156件を表示]
(0.126秒)
ライブラリ
- ビルトイン (56)
-
cgi
/ html (12) -
net
/ ftp (10) -
net
/ imap (12) - rake (24)
- shell (6)
-
shell
/ builtin-command (12) -
shell
/ command-processor (6) -
shell
/ filter (6) -
webrick
/ httputils (12)
クラス
- Array (16)
- Module (36)
-
Net
:: FTP :: MLSxEntry (10) -
Net
:: IMAP (12) -
Rake
:: InvocationChain (12) -
Rake
:: InvocationChain :: EmptyInvocationChain (12) - Shell (6)
-
Shell
:: AppendFile (6) -
Shell
:: AppendIO (6) -
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6) - String (4)
-
WEBrick
:: HTTPUtils :: FormData (12)
モジュール
-
CGI
:: TagMaker (12)
キーワード
- << (1)
-
append
_ as _ bytes (1) -
append
_ data (12) -
append
_ features (12) - appendable? (10)
- concat (2)
- include (12)
- included (12)
- input= (12)
-
nOE
_ element _ def (12) - push (8)
検索結果
先頭5件
-
Shell
:: AppendFile # input=(filter) (9101.0) -
@todo
@todo -
Shell
:: AppendIO # input=(filter) (9101.0) -
@todo
@todo -
CGI
:: TagMaker # nOE _ element _ def(element , append = nil) (6202.0) -
@todo
@todo -
Module
# include(*mod) -> self (6107.0) -
モジュール mod をインクルードします。
...Enumerable など)を指定します。
@raise ArgumentError 継承関係が循環してしまうような include を行った場合に発生します。
//emlist[例][ruby]{
module M
end
module M2
include M
end
module M
include M2
end
//}
実行結果:
-:3:in `append_features': cyclic in......de detected (ArgumentError)
from -:3:in `include'
from -:3
インクルードとは、指定されたモジュールの定義
(メソッド、定数) を引き継ぐことです。
インクルードは多重継承の代わりに用いられており、 mix-in とも呼びま......す。
//emlist[例][ruby]{
class C
include FileTest
include Math
end
p C.ancestors
# => [C, Math, FileTest, Object, Kernel]
//}
モジュールの機能追加は、クラスの継承関係の間にそのモジュールが挿入
されることで実現されています。従って、メソ... -
Module
# included(class _ or _ module) -> () (6107.0) -
self が Module#include されたときに対象のクラスまたはモジュー ルを引数にしてインタプリタがこのメソッドを呼び出します。
...#include されたときに対象のクラスまたはモジュー
ルを引数にしてインタプリタがこのメソッドを呼び出します。
@param class_or_module Module#include を実行したオブジェクト
//emlist[例][ruby]{
module Foo
def self.included(mod)
p "#{mod} inc......lude #{self}"
end
end
class Bar
include Foo
end
# => "Bar include Foo"
//}
@see Module#append_features... -
String
# concat(*arguments) -> self (6107.0) -
self に複数の文字列を破壊的に連結します。
...場合は Integer#chr の結果に相当する文字を末尾に追加します。追加する文字のエンコーディングは self.encoding です。
self を返します。
@param arguments 複数の文字列もしくは 0 以上の整数
//emlist[例][ruby]{
str = "foo"
str.concat
p str......# => "foo"
str = "foo"
str.concat "bar", "baz"
p str # => "foobarbaz"
str = "foo"
str.concat("!", 33, 33)
p str # => "foo!!!"
//}
@see String#append_as_bytes... -
String
# concat(other) -> self (6102.0) -
self に文字列 other を破壊的に連結します。 other が 整数である場合は other.chr(self.encoding) 相当の文字を末尾に追加します。
...合は other.chr(self.encoding) 相当の文字を末尾に追加します。
self を返します。
@param other 文字列もしくは 0 以上の整数
//emlist[例][ruby]{
str = "string"
str.concat "XXX"
p str # => "stringXXX"
str << "YYY"
p str # => "stringXXXYYY"
str << 65 # 文......字AのASCIIコード
p str # => "stringXXXYYYA"
//}... -
Array
# push(*obj) -> self (6002.0) -
指定された obj を順番に配列の末尾に追加します。 引数を指定しなければ何もしません。
...れば何もしません。
@param obj 自身に追加したいオブジェクトを指定します。
//emlist[例][ruby]{
array = [1, 2, 3]
array.push 4
array.push [5, 6]
array.push 7, 8
p array # => [1, 2, 3, 4, [5, 6], 7, 8]
//}
@see Array#pop, Array#shift, Array#unshift, Array#<<... -
String
# <<(other) -> self (3002.0) -
self に文字列 other を破壊的に連結します。 other が 整数である場合は other.chr(self.encoding) 相当の文字を末尾に追加します。
...合は other.chr(self.encoding) 相当の文字を末尾に追加します。
self を返します。
@param other 文字列もしくは 0 以上の整数
//emlist[例][ruby]{
str = "string"
str.concat "XXX"
p str # => "stringXXX"
str << "YYY"
p str # => "stringXXXYYY"
str << 65 # 文......字AのASCIIコード
p str # => "stringXXXYYYA"
//}...