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)
6 7 8 |
# File 'lib/jekyll_asset_pipeline/extensions/ruby/subclass_tracking.rb', line 6 def inherited(base) subclasses << base end |
#subclasses ⇒ Object
Return an array of classes that are subclasses of this object
11 12 13 |
# File 'lib/jekyll_asset_pipeline/extensions/ruby/subclass_tracking.rb', line 11 def subclasses @subclasses ||= [] end |