Class: HTMLPipeline::ConvertFilter

Inherits:
Filter
  • Object
show all
Defined in:
lib/html_pipeline/convert_filter.rb,
lib/html_pipeline/convert_filter/markdown_filter.rb

Direct Known Subclasses

MarkdownFilter

Defined Under Namespace

Classes: MarkdownFilter

Instance Attribute Summary collapse

Attributes inherited from Filter

#context, #result

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Filter

#base_url, #call, #has_ancestor?, #needs, #validate

Constructor Details

#initialize(context: {}, result: {}) ⇒ ConvertFilter

Returns a new instance of ConvertFilter.



7
8
9
# File 'lib/html_pipeline/convert_filter.rb', line 7

def initialize(context: {}, result: {})
  super
end

Instance Attribute Details

#htmlObject (readonly)

Returns the value of attribute html.



5
6
7
# File 'lib/html_pipeline/convert_filter.rb', line 5

def html
  @html
end

#textObject (readonly)

Returns the value of attribute text.



5
6
7
# File 'lib/html_pipeline/convert_filter.rb', line 5

def text
  @text
end

Class Method Details

.call(text, context: {}, result: {}) ⇒ Object



12
13
14
# File 'lib/html_pipeline/convert_filter.rb', line 12

def call(text, context: {}, result: {})
  new(context: context, result: result).call(text)
end