Module: JekyllAssetPipeline::SubclassTracking
- Included in:
- Compressor, Converter, Template
- Defined in:
- lib/jekyll_asset_pipeline/extensions/ruby/subclass_tracking.rb
Overview
Allows classes that extend this to return an array of their subclasses
Instance Method Summary collapse
-
#inherited(base) ⇒ Object
Record subclasses of this class (this method is automatically called by ruby).
-
#subclasses ⇒ Object
Return an array of classes that are subclasses of this object.
Instance Method Details
#inherited(base) ⇒ Object
Record subclasses of this class (this method is automatically called by ruby)
8 9 10 |
# File 'lib/jekyll_asset_pipeline/extensions/ruby/subclass_tracking.rb', line 8 def inherited(base) subclasses << base end |
#subclasses ⇒ Object
Return an array of classes that are subclasses of this object
13 14 15 |
# File 'lib/jekyll_asset_pipeline/extensions/ruby/subclass_tracking.rb', line 13 def subclasses @subclasses ||= [] end |