Class: Nanoc::Filters::CodeRay
- Inherits:
-
Nanoc::Filter
- Object
- Context
- Nanoc::Filter
- Nanoc::Filters::CodeRay
- Defined in:
- lib/nanoc/filters/coderay.rb
Constant Summary
Constant Summary
Constants inherited from Nanoc::Filter
Nanoc::Filter::TMP_BINARY_ITEMS_DIR
Instance Attribute Summary
Attributes inherited from Nanoc::Filter
Instance Method Summary (collapse)
-
- (Object) run(content, params = {})
deprecated
Deprecated.
Use the
:colorize_syntax
filter instead.
Methods inherited from Nanoc::Filter
#depend_on, #filename, from_binary?, #initialize, #output_filename, requires, setup, #setup_and_run, to_binary?, type
Methods included from PluginRegistry::PluginMethods
#all, #identifier, #identifiers, #named, #register
Methods inherited from Context
Constructor Details
This class inherits a constructor from Nanoc::Filter
Instance Method Details
- (Object) run(content, params = {})
Deprecated.
Use the :colorize_syntax
filter instead.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/nanoc/filters/coderay.rb', line 8 def run(content, params = {}) # Warn warn 'The :coderay filter is deprecated; consider using the :colorize_syntax filter instead.' # Check params raise ArgumentError, 'CodeRay filter requires a :language argument which is missing' if params[:language].nil? # Get result ::CodeRay.scan(content, params[:language]).html end |