Class: BibTeX::Filter

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/bibtex/filters.rb

Class Method Summary collapse

Instance Method Summary collapse

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

.subclassesObject

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