Class: RevealCK::FilteredHtmlString

Inherits:
Object
  • Object
show all
Includes:
Retrieve
Defined in:
lib/reveal-ck/filtered_html_string.rb

Overview

Enables easy filtering of an HTML string through an html-pipeline.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Retrieve

included, #retrieve

Constructor Details

#initialize(args) ⇒ FilteredHtmlString

Returns a new instance of FilteredHtmlString.



7
8
9
10
11
# File 'lib/reveal-ck/filtered_html_string.rb', line 7

def initialize(args)
  @html = retrieve(:html, args)
  @pipeline = retrieve(:pipeline, args)
  @config = retrieve(:config, args)
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



5
6
7
# File 'lib/reveal-ck/filtered_html_string.rb', line 5

def config
  @config
end

#htmlObject (readonly)

Returns the value of attribute html.



5
6
7
# File 'lib/reveal-ck/filtered_html_string.rb', line 5

def html
  @html
end

#pipelineObject (readonly)

Returns the value of attribute pipeline.



5
6
7
# File 'lib/reveal-ck/filtered_html_string.rb', line 5

def pipeline
  @pipeline
end

Instance Method Details

#renderObject



13
14
15
# File 'lib/reveal-ck/filtered_html_string.rb', line 13

def render
  apply_pipeline(pipeline, config).to_s
end