Class: ArticleSyncEmbed
- Inherits:
-
Liquid::Tag
- Object
- Liquid::Tag
- ArticleSyncEmbed
- Defined in:
- lib/jekyll-artisync.rb
Instance Method Summary collapse
-
#initialize(tagName, content, tokens) ⇒ ArticleSyncEmbed
constructor
A new instance of ArticleSyncEmbed.
- #render(context) ⇒ Object
Constructor Details
#initialize(tagName, content, tokens) ⇒ ArticleSyncEmbed
Returns a new instance of ArticleSyncEmbed.
7 8 9 10 |
# File 'lib/jekyll-artisync.rb', line 7 def initialize(tagName, content, tokens) super @content = content end |
Instance Method Details
#render(context) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/jekyll-artisync.rb', line 12 def render(context) url = Liquid::Template.parse(@content).render(context).strip uri = URI(url) syncer = SyncerFactory.get_syncer(uri) return syncer.gen_html end |