Class: SDL::Base::Type::RecursiveSubtypes
- Inherits:
-
Object
- Object
- SDL::Base::Type::RecursiveSubtypes
- Includes:
- Enumerable
- Defined in:
- lib/sdl/base/type.rb
Instance Method Summary collapse
- #each {|@type| ... } ⇒ Object
-
#initialize(type) ⇒ RecursiveSubtypes
constructor
A new instance of RecursiveSubtypes.
Constructor Details
#initialize(type) ⇒ RecursiveSubtypes
Returns a new instance of RecursiveSubtypes.
11 12 13 |
# File 'lib/sdl/base/type.rb', line 11 def initialize(type) @type = type end |
Instance Method Details
#each {|@type| ... } ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/sdl/base/type.rb', line 15 def each yield @type @type.subtypes.each do |subtype| subtype.subtypes_recursive.each do |type| yield type end end end |