55件ヒット
[1-55件を表示]
(0.085秒)
種類
- インスタンスメソッド (44)
- 文書 (11)
クラス
- Object (22)
-
Rake
:: FileList (22)
検索結果
先頭5件
-
Rake
:: FileList # is _ a?(klass) -> bool (21206.0) -
自身に Array のフリをさせます。
...自身に Array のフリをさせます。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new("test1.rb", "test2.rb", "test3.rb")
file_list.is_a?(Array) # => true
file_list.is_a?(String) # => false
end
//}... -
Object
# is _ a?(mod) -> bool (18212.0) -
オブジェクトが指定されたクラス mod かそのサブクラスのインスタンスであるとき真を返します。
...します。
Module#includeだけではなく、Object#extendやModule#prependに
よってサブクラスのインスタンスになる場合も含みます。
上記のいずれでもない場合に false を返します。
@param mod クラスやモジュールなど、Moduleかそのサブク......です。
//emlist[][ruby]{
module M
end
class C < Object
include M
end
class S < C
end
obj = S.new
p obj.is_a?(S) # true
p obj.is_a?(C) # true
p obj.is_a?(Object) # true
p obj.is_a?(M) # true
p obj.is_a?(Hash) # false
//}
@see Object#instance_of?,Module#===,Object#class... -
Rake
:: FileList # kind _ of?(klass) -> bool (6106.0) -
自身に Array のフリをさせます。
...自身に Array のフリをさせます。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new("test1.rb", "test2.rb", "test3.rb")
file_list.is_a?(Array) # => true
file_list.is_a?(String) # => false
end
//}... -
Object
# kind _ of?(mod) -> bool (3112.0) -
オブジェクトが指定されたクラス mod かそのサブクラスのインスタンスであるとき真を返します。
...します。
Module#includeだけではなく、Object#extendやModule#prependに
よってサブクラスのインスタンスになる場合も含みます。
上記のいずれでもない場合に false を返します。
@param mod クラスやモジュールなど、Moduleかそのサブク......です。
//emlist[][ruby]{
module M
end
class C < Object
include M
end
class S < C
end
obj = S.new
p obj.is_a?(S) # true
p obj.is_a?(C) # true
p obj.is_a?(Object) # true
p obj.is_a?(M) # true
p obj.is_a?(Hash) # false
//}
@see Object#instance_of?,Module#===,Object#class... -
Ruby用語集 (3036.0)
-
Ruby用語集 A B C D E F G I J M N O R S Y
... ra wa
=== 記号・数字
: %記法
: % notation
「%」記号で始まる多種多様なリテラル記法の総称。
参照:d:spec/literal#percent
: 0 オリジン
: zero-based
番号が 0 から始まること。
例えば、
Array や Vector、Matrix などの要素の番......by から。
参照:irb
: is-a 関係
Ruby では Object#is_a? で確認できる関係。
たとえば、配列オブジェクトは Array クラスや Enumerable モジュール、Object クラス
などに対して is_a? の関係にある。
: ISO/IEC 30170
JIS X 3017 の原規......る。
true/false を返すとは限らず、真である場合に、true 以外のオブジェクトを
返すことで、単なる真偽を越えた情報を与えるものもある。
: 上位クラス
: superclass
=スーパークラス
: 条件演算子
: conditional operator
条...