Class: EBookReaderTag
- Inherits:
-
Liquid::Tag
- Object
- Liquid::Tag
- EBookReaderTag
- Defined in:
- lib/jekyll/ebook_reader.rb
Overview
Adds relevant scripts and html tags to html body
Instance Method Summary collapse
-
#initialize(tag_name, input, tokens) ⇒ EBookReaderTag
constructor
A new instance of EBookReaderTag.
- #render(context) ⇒ Object
Constructor Details
#initialize(tag_name, input, tokens) ⇒ EBookReaderTag
Returns a new instance of EBookReaderTag.
44 45 46 47 |
# File 'lib/jekyll/ebook_reader.rb', line 44 def initialize(tag_name, input, tokens) super @input = input end |
Instance Method Details
#render(context) ⇒ Object
49 50 51 52 53 54 |
# File 'lib/jekyll/ebook_reader.rb', line 49 def render(context) path = File.join(File.dirname(__FILE__), "ebook_reader", "assets/jekyll-ebookreader-assets/ebook_include_body_tag.html") include_string = File.read(path) Liquid::Template.parse(include_string).render(context) end |