Class: Daimon::Markdown::Processor
- Inherits:
-
Object
- Object
- Daimon::Markdown::Processor
- Defined in:
- lib/daimon/markdown/processor.rb
Constant Summary collapse
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Instance Method Summary collapse
- #call(input, context = {}) ⇒ Object
- #filters ⇒ Object
-
#initialize(context = {}) ⇒ Processor
constructor
A new instance of Processor.
Constructor Details
#initialize(context = {}) ⇒ Processor
Returns a new instance of Processor.
17 18 19 |
# File 'lib/daimon/markdown/processor.rb', line 17 def initialize(context = {}) @context = context end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
15 16 17 |
# File 'lib/daimon/markdown/processor.rb', line 15 def context @context end |
Instance Method Details
#call(input, context = {}) ⇒ Object
21 22 23 |
# File 'lib/daimon/markdown/processor.rb', line 21 def call(input, context = {}) HTML::Pipeline.new(filters, @context).call(input, context) end |
#filters ⇒ Object
25 26 27 |
# File 'lib/daimon/markdown/processor.rb', line 25 def filters @filters ||= DEFAULT_FILTERS.clone end |