調べてみたところ、一手間かけたら取得することができるみたいだ。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Foo | |
end | |
class Bar | |
extend Foo | |
end | |
Bar.included_modules.include?(Foo) | |
Bar.include?(Foo) | |
# => false | |
(class << Bar self end).included_modules.include?(Foo) | |
Bar.singleton_class.include?(Foo) | |
# => true |
0 件のコメント :
コメントを投稿