Class: QDA::Filters::CategoryOutputFilter

Inherits:
OutputFilter show all
Defined in:
lib/weft/filters/output.rb

Overview

A filter that formats a Category for output, including supplying the text marked by the category

Constant Summary collapse

EXPORT_CLASS =
Category

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from OutputFilter

#initialize

Constructor Details

This class inherits a constructor from QDA::Filters::OutputFilter

Class Method Details

.def_name(cat) ⇒ Object



35
36
37
# File 'lib/weft/filters/output.rb', line 35

def CategoryOutputFilter.def_name(cat) 
  'category-' << cat.name.gsub(/\s+/, '_').gsub(/\W/,'')
end

Instance Method Details

#variables(obj) ⇒ Object



39
40
41
# File 'lib/weft/filters/output.rb', line 39

def variables(obj)
  { 'text' => @app.get_text_at_category(obj) }
end