Class: ArticleSyncEmbed

Inherits:
Liquid::Tag
  • Object
show all
Defined in:
lib/jekyll-artisync.rb

Instance Method Summary collapse

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