Class: BibTeX::Filter
- Inherits:
-
Object
- Object
- BibTeX::Filter
- Includes:
- Singleton
- Defined in:
- lib/bibtex/filters.rb
Direct Known Subclasses
Class Method Summary collapse
-
.inherited(base) ⇒ Object
Hook called by Ruby if Filter is subclassed.
-
.subclasses ⇒ Object
Returns a list of all current Filters.
Instance Method Summary collapse
- #apply(value) ⇒ Object (also: #convert, #<<)
Class Method Details
.inherited(base) ⇒ Object
Hook called by Ruby if Filter is subclassed
9 10 11 12 |
# File 'lib/bibtex/filters.rb', line 9 def inherited(base) base.class_eval { include Singleton } subclasses << base end |
.subclasses ⇒ Object
Returns a list of all current Filters
15 16 17 |
# File 'lib/bibtex/filters.rb', line 15 def subclasses @subclasses ||= [] end |
Instance Method Details
#apply(value) ⇒ Object Also known as: convert, <<
20 21 22 |
# File 'lib/bibtex/filters.rb', line 20 def apply(value) value end |