Class: TextFilter

Inherits:
Object show all
Includes:
Annotatable, Simpleton
Defined in:
app/models/text_filter.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Annotatable

included

Methods included from Simpleton

included

Class Method Details

.description_file(filename) ⇒ Object



20
21
22
23
# File 'app/models/text_filter.rb', line 20

def description_file(filename)
  text = File.read(filename) rescue ""
  self.description text
end

.filter(text) ⇒ Object



16
17
18
# File 'app/models/text_filter.rb', line 16

def filter(text)
  instance.filter(text)
end

.inherited(subclass) ⇒ Object



12
13
14
# File 'app/models/text_filter.rb', line 12

def inherited(subclass)
  subclass.filter_name = subclass.name.to_name('Filter')
end

Instance Method Details

#filter(text) ⇒ Object



7
8
9
# File 'app/models/text_filter.rb', line 7

def filter(text)
  text
end